Using Aptana and Ext with Nettalk Web Server

There’s some good discussion centering on web development going on at NetTalk Central.

One of the threads has some folk talking about using the Aptana IDE with Ext 2.0 (Javascript Library), inside the NetTalk WebServer.

Further, if you install Spket you can get proper code completion for Ext within the Aptana interface.

Javascript libraries (Ext, YUI, Scriptaculous, Prototype, and more here) are all the rage, and have been for more than a year now. They provide desktop-ish functionality within the boundaries of the web. That’s a fantastic thing.

But what people forget is that the web is _not_ the desktop. There will always be things the web cannot do that the desktop can. There will always be things the desktop can’t do that the web can. At least until Google takes over and Borgs all desktops and the web, assimilating into one gigantic organism.

I like the differences. And I like that you can meld the two together, playing off both sets of strengths.

NetTalk WebServer gives us the ability to weave desktop functionality into the web. You can’t do everything. You cannot make a desktop program with the desktop paradigm of browse and form windows.

wait! "What’s this?" you say. NetTalk WebServer can so create Browses and Update Forms.

. It can. But it’s still the web. The Browse window is not "open" while the Form Update window is "open". The web has single direction. We have Session Vars to compensate, and the almighty "Back" button .. but none of these will ever make it exactly the same.

And that is good. We should embrace this as we develop in NTWS.

You can only go onward and upwards, never backwards

Jaymoe, A Work Still In Progress

For the past couple of months, I’ve been working, a few hours a week, on Jaymoe. It’s a Sporting Club Web System, "basically". Ha ha.

jaymoeversion1-001Anyway, Version 1 took me about 7 days to slap together with Clarion, NetTalk and some use of Lightbox (javascript image effect library, built on Scriptaculous). Version 1 isn’t much to write home about. You can see the demo here.

 

At this point in the development, I discovered Ext. This changed what I thought I could achieve. If I could pull out the UI of NetTalk, Ext can give me awesomeness in a bottle. But the beauty of NetTalk is that it provides me with a bunch of template driven windows (like Forms, Browses, Dropdowns) and all I have to do is fill in some template fields.

Given the amazing demos of Ext, I decided that it was worth it.

And it was, to an extent. Jaymoe V2 is well on the way to becoming something special.

But it’s too much. Not only did the entire UI change, but the Database underwent a massive overhaul.

In Version 1, Jaymoe had a database who’s data entry was driven both by the end user, and by myself (or someone at the server end). In some situations, this is a strength. But for Jaymoe, it’s a weakness. I would have to upkeep all the backbone stats for the Clubs. From their Division information to each Round’s Games. Crazy. Absolutely crazy.

So what could I do?

Take a leaf out of the social networking sites. Move everything under the control of the User. Well, not everything .. just .. everything.

jaymoedb-001

So now, the DB is a different monster all together. Almost everything (for the purposes of this post anyway, heh heh) sits under two important files. One is the User file. This cannot be directly affected by the User themselves. The other is the Entity file. Underneath the Entity are all the User interactive files. Stats, News, Images, and so on. The User logs into their Entity, and controls what Sport they are playing, when the Games are, who scored how many tries.

Of course, there are problems with this approach. Designing a Lazy system is best. With the database strong, it falls on the implementation to make sure the User doesn’t have to do too much. Entering every single Game in a Season might be considered too much.

How do you solve this problem?

One way is to provide a template (say xml in this case) which is for whatever data they are populating. This would have to be maintained at the server end, and we return to the same problem as before. Why should I have to maintain this data?

Another method would be to "share" the data across Entities. So that certain data entered by one User (for an Entity), is shared across other Entities.

This idea works when you have a few teams in one division using the system at once. But if you’re the only team in your division, noone else is entering the relevant information for you. Which leads back to you entering all the info yourself.

I haven’t solved it yet. But will chew away for a while.

There is more I’d like to say about Ext and problems I’ve encountered along the way. Another post. Seeya then.