Friday, July 16, 2010

*Updated* Apex jQuery spinbox v1.0 [plugin]

After a review of Patrick Wolf, a few changes are incorporated to make this plugin a 1.0 version. As I said before, my first try was really simple (hence the 0.1), and Patrick took the time to review and change/add some of the code of the plugin. The following things have changed:

* Minimum value is required
* New number alignment attribute
* Autocomplete for text field is turned off
* New validation code that:

1. Checks if the value is numeric
2. Checks if the value is in range of min/max
3. Returns validation messages

* Renamed the library files according to apex jQuery namespace
* Added source files in release
* Added server ready files in case of webserver install
* Added a readme file
* Added installation and de-installation steps in the readme file

You can still find the demo on this location.
The download is stille hosted here.

And again, thanks to Patrick for the help!
Now go on, have fun with this plugin!

Wednesday, July 14, 2010

Apex jQuery spinbox [plugin]

!!===========================================================
New version available check the next post.
!!===========================================================
This is the first plugin I created, using the spinbox plugin for jQuery, and wrapping some PL/SQL around it. It's very comparable to Patrick Wolf's mask example.

It's a very simple plugin, only rendering the field with extra up and down buttons at the end of the field, by clicking it adds or subtracts the "stepsize" parameter set in the settings. You can also set minimum and maximum parameters if you want to restrict the numbers (client side only ofcourse).

The demo: http://apex.oracle.com/pls/apex/f?p=44781:3
The download: http://www.apex-plugin.com/oracle-apex-plugins/item-plugin/spinbox.html

Have fun with it.

Plugging in the Apex Item Plugin

Is it really more than a year since my last post on this blog? Time flies when you're having fun. Talking about fun, you probably noticed the release of Apex 4. This action packed release has a lot to offer. I just recently took the time to do some research on the new features. And yes, most like everyone else in the Apex blogging scene, I really wanted to try some plugins and dynamic actions.
Funny observation: The most mentioned feature of Apex 4 before the Early Adopters editions, websheets are not mentioned as often anymore.

Having said that, today I wanted to write about my view on the apex item plugins. I've created one, and I must say it is really nice functionality. It'll create a lot more flexibility by adding almost limitless options. If this is a good thing? More on that later.

Item plugins in apex...gamechanger?
Many item plugins are actually done many times before. Think of one really original item type or functionality in an item, and it'll probably been done before. So the item plugins feel more like "closing the gap" with other frameworks that allready have rich item types, or plugin functionality (Like ADF and .NET), than a game changer in framework choice.

Closing a gap? ....how fast?
Another very cool thing to bear in mind, is that Apex almost seamlessly integrates jQuery in it's pages. jQuery has supported plugins for their framework for some time now, and there are lot of plugins lying around.
With item plugins in Apex it's almost logical to assume that Apex developers don't want to double their work. So get a jQuery plugin, wrap an Apex plugin around it, and boom, there you go... working jquery plugins as declaritive items in apex. So it's pretty easy to create a lot of item plugins for apex on the short term. I think that in a year or so, almost all mainstream item types found in other frameworks, can be done in Apex. Different apex plugin repositories are allready popping into existence, hoping to be the next App Store for Apex Developers.

Things to think about
While the general concensus will probably be positive on item plugins, there are still things to think about. One of the key aspects in Apex developement for me, was the fast, uniform way of working. No matter what client, or what project, the tool and it's functionality was the same. For me this is/was one of the key aspects in the debate on Java and Apex, mentioning JAF (Just Another Framework) very often to the Java guy. I'm well aware that the plugins for Apex are nowhere near as complex as a completely different framework in Java, but I'm just saying that spiderman's Uncle Ben had it wrong, he should've said: "With great flexibility, comes great responsibility". Ironically, you now have more potential to lock your environment in flexibility, because it has so many different little plugins.

So... do I like it ?
Yes! I like the plugin system very much! I think it's great, and I see a big maturement of the framework. This will really help arguing on why Apex is a good choice in many situations. But it's the architects/developers responsibility to restrict some of this newly found flexibility. Define, Create, Copy, Discover or just write a basic set of plugins for your Apex environment. Work with these plugins across the line. Really think about why you would use a plugin, and if so, incorporate it in the environments plugin repository. Don't let it get messy, it'll break you up one day.

Later today, I'll post my first (very simple) Item Plugin.

P.S.
All of the above is quite inherent with any modular software developement....