I had a need to enable drag-n-drop for a particular part of our portal. In the past I’ve always used jQuery-UI as it’s quite easy to enable drag-n-drop. Doing some research I came across a StackOverflow question about enabling drag-n-drop with Polymer. One of the answers mentioned sortablejs. This is a very minimalist library to enable drag-n-drop. Best part about this library is that it has a port for Polymer. BONUS! But there are several ports available: Angular, Knockout, Meteor, etc. So implementation is super easy: bower install –save polymer-sortablejs Then where you want to use it: <sortable-js draggable=”div” group=”divs”> <template is=”dom-repeat” items=”{{repeatableItems}}”> <div>{{item}}</div> </template> </sortable-js> This will enable all the

close

I had a need to enable drag-n-drop for a particular part of our portal. In the past I’ve always used jQuery-UI as it’s quite easy to enable drag-n-drop. Doing some research I came across a StackOverflow question about enabling drag-n-drop with Polymer. One of the answers mentioned sortablejs. This is a very minimalist library to enable drag-n-drop. Best part about this library is that it has a port for Polymer. BONUS! But there are several ports available: Angular, Knockout, Meteor, etc. So implementation is super easy: bower install –save polymer-sortablejs Then where you want to use it: <sortable-js draggable=”div” group=”divs”> <template is=”dom-repeat” items=”{{repeatableItems}}”> <div>{{item}}</div> </template> </sortable-js> This will enable all the

Read more

Posted in JavaScript, Polymer

For about the last 6 to 8 months I’ve been doing a lot of development using Polymer Web Components. I started with the 0.5 developer release version. My experience so far has been a little bitter sweet.  Using version 0.5 I had to jump quite a few hoops to get things working, but once I figured out the patterns all was well with the world. In the Beginning I had chosen to use Backbone Marionette for the MVC architecture for my apps. I already knew Marionette so I felt the logical choice was to stay productive and just use what I already knew and use the web components in my templates. If I

close

For about the last 6 to 8 months I’ve been doing a lot of development using Polymer Web Components. I started with the 0.5 developer release version. My experience so far has been a little bitter sweet.  Using version 0.5 I had to jump quite a few hoops to get things working, but once I figured out the patterns all was well with the world. In the Beginning I had chosen to use Backbone Marionette for the MVC architecture for my apps. I already knew Marionette so I felt the logical choice was to stay productive and just use what I already knew and use the web components in my templates. If I

Read more

Welcome to keithstric.me. The new home of my blog. Due to my inaction I ended up loosing keithstric.com. I was able to move the past 10 years worth of blog posts here, but I’m still missing the first 4 years of posts. Oh well, guess that’s what happens when you ignore a problem. But let’s get to my rant. I’m building an application using just Polymer. It’s a RESTful application so all server communication is via AJAX requests. When dealing with AJAX requests it’s fairly easy to catch an error. Error codes are communicated via a request’s “Status Code”. A successful status code is 2xx. While an error status code is 4xx

close

Welcome to keithstric.me. The new home of my blog. Due to my inaction I ended up loosing keithstric.com. I was able to move the past 10 years worth of blog posts here, but I’m still missing the first 4 years of posts. Oh well, guess that’s what happens when you ignore a problem. But let’s get to my rant. I’m building an application using just Polymer. It’s a RESTful application so all server communication is via AJAX requests. When dealing with AJAX requests it’s fairly easy to catch an error. Error codes are communicated via a request’s “Status Code”. A successful status code is 2xx. While an error status code is 4xx

Read more

Posted in Domino, JavaScript

So today while looking for a solution to handling an HTML5 event of onSearch I came across this technique, which, probably isn't the best approach but does work. So, if you look at the client side events of an inputText field, you'll notice there isn't an event for onSearch. So, how do you add one? Well, you could of course go pass-thru html and just code the field as you would a Plain Jane HTML field. While this would work, to me it's just not taking advantage of the platform and wouldn't allow you to compute any of the other attributes. So to address this issue we add an attribute to

close

So today while looking for a solution to handling an HTML5 event of onSearch I came across this technique, which, probably isn't the best approach but does work. So, if you look at the client side events of an inputText field, you'll notice there isn't an event for onSearch. So, how do you add one? Well, you could of course go pass-thru html and just code the field as you would a Plain Jane HTML field. While this would work, to me it's just not taking advantage of the platform and wouldn't allow you to compute any of the other attributes. So to address this issue we add an attribute to

Read more

Posted in JavaScript, XPages

I've recently started playing with a very powerful Javascript library called D3.js. D3 is for visualizing data either in charts, force layout graphs, data plots or whatever you can imagine. I'm not really sure what the point of this post is as I really can't show you yet what we're using it for. But I can show some of the things that it's capable of.   Let's first look at a Force Directed Layout. These are usually used to show hierarchical data and the way D3 handles them is very cool looking. You can also include labels, pop ups, etc for the nodes on the plot. If you're really interested in this

close

I've recently started playing with a very powerful Javascript library called D3.js. D3 is for visualizing data either in charts, force layout graphs, data plots or whatever you can imagine. I'm not really sure what the point of this post is as I really can't show you yet what we're using it for. But I can show some of the things that it's capable of.   Let's first look at a Force Directed Layout. These are usually used to show hierarchical data and the way D3 handles them is very cool looking. You can also include labels, pop ups, etc for the nodes on the plot. If you're really interested in this

Read more

Posted in D3.js, JavaScript, XPages

So, I’ve been cleaning up a lot of my “first starting” mess here in XBlog. The Posts, Comments and Pages are now “componentized” as opposed to being just generated HTML. Don’t get me wrong there is still a lot of “generated” HTML here, but it’s at least getting to be more manageable. But during this clean up I decided to implement a client side API of sorts and the best way to do that is to create a JavaScript Singleton to hold all the CSJS functions and properties as that would provide the most robust solution to provide other people the ability to expand XBlog. What is a singleton? Well here’s

close

So, I’ve been cleaning up a lot of my “first starting” mess here in XBlog. The Posts, Comments and Pages are now “componentized” as opposed to being just generated HTML. Don’t get me wrong there is still a lot of “generated” HTML here, but it’s at least getting to be more manageable. But during this clean up I decided to implement a client side API of sorts and the best way to do that is to create a JavaScript Singleton to hold all the CSJS functions and properties as that would provide the most robust solution to provide other people the ability to expand XBlog. What is a singleton? Well here’s

Read more

Posted in JavaScript, XPages

Over on Matt White ‘s website he posted a video of the Flash Builder Reverse Debugger which is really cool. It shows the ability (among others) for a user when they encounter an error in the application they’re using being able to send a debug file to the developer. Once the developer gets this file he/she can load it up in the debugger and see exactly what they were doing when they encountered the error including variable values and the like. This is very cool stuff. This video got me thinking about a conversation I had with Tim Tripcony a few weeks ago when we were talking about how we could

close

Over on Matt White ‘s website he posted a video of the Flash Builder Reverse Debugger which is really cool. It shows the ability (among others) for a user when they encounter an error in the application they’re using being able to send a debug file to the developer. Once the developer gets this file he/she can load it up in the debugger and see exactly what they were doing when they encountered the error including variable values and the like. This is very cool stuff. This video got me thinking about a conversation I had with Tim Tripcony a few weeks ago when we were talking about how we could

Read more

While going through the blogosphere today I saw a post on Bob Balfe’s blog pointing to the The Dojo Toolkit Blog (which I added to my reader, thanks Bob). On that blog I saw a post talking about Dojo and MooTools joining forces which will be called dojools. During this transition both frameworks will be loosing and gaining parts of their respective APIs. The merger kind-of concerns me as a lot of my work is based on Dojo and this may break a lot of projects that I’ve been working on. I guess we’ll just have to wait and see what shakes out at the end. But while looking for some

close

While going through the blogosphere today I saw a post on Bob Balfe’s blog pointing to the The Dojo Toolkit Blog (which I added to my reader, thanks Bob). On that blog I saw a post talking about Dojo and MooTools joining forces which will be called dojools. During this transition both frameworks will be loosing and gaining parts of their respective APIs. The merger kind-of concerns me as a lot of my work is based on Dojo and this may break a lot of projects that I’ve been working on. I guess we’ll just have to wait and see what shakes out at the end. But while looking for some

Read more

Posted in Dojo, JavaScript, XPages