Should I stick with Javascript or move to another way of doing things?
June 17, 2010 12:15 PM   Subscribe

Any resources for quickly developing data-entry heavy applications in JQuery/Javascript? Alternatively, how much quicker is it to get applications running in Flash/Silverlight than Javascript?

I have a good grasp of Javascript, but I'm find it gets tedious very quickly when developing larger applications. I can never seem to get in the "groove" of things like I can when working on the server side code. I previously worked with GWT and this is really an ideal solution, but Java is out for now for reasons beyond my control. My application isn't complex, but it is large. From a UI standpoint it is most analogous to something like Google AdSense. There's some reporting, but there's a lot of interaction: picking things, validating, a lot of workflow, etc. There seems to be a certain point and I just get lost and things get ugly.

I've really not found any resources on how to manage a large application. I've found some success in forcing myself to write in GWT style (panels, widgets, etc.), but it really doesn't feel right.

So barring any breakthroughs on the Javascript, I've started looking into Silverlight and Flash. Playing around with both, it feels like I can be more productive in either. As my application is internal, adoption of either plugin isn't a big deal. Am I in for some productivity gains by getting rid of Javascript and moving to one of these platforms? Should I hold out and keep hacking away with what I'm doing?
posted by geoff. to Computers & Internet (12 answers total) 7 users marked this as a favorite
I haven't used it in a couple years (and I believe the licensing has become more restrictive and commercial in the meantime) but extjs was a good fit for a heavier JavaScript application for local network use when I implemented such a thing. Like some JS frameworks it has its own syntax discrepancies with basic JavaScript, but it seemed reasonably well put together.
posted by mikeh at 12:24 PM on June 17, 2010

I agree that ExtJS will be a good fit for this kind of app.
posted by zsazsa at 12:40 PM on June 17, 2010

YUI, ExtJS, JQueryUI are all worth considering closely.

What backend technologies do you use? Things like GWT bundle up the JS for you, theoretically.
posted by artlung at 12:49 PM on June 17, 2010

I have never used Silverlight, but this is the kind of job Flex was made for. If you're used to a real object-oriented environment (as opposed to the mockery that is "object-based" JS), it will come very naturally to you. And you'll completely eliminate the headache of cross-browser testing.

You'll also be able to port the same code to a desktop app in just a few clicks, using AIR.
posted by drjimmy11 at 1:25 PM on June 17, 2010

Best answer: I would break everything down into modules, and use this pattern for them.
posted by Artw at 3:29 PM on June 17, 2010

Flex and SL are pretty great for this. The worst thing about either of them is the backlash from haters. That can be a serious obstacle or not, depending on the audience. In the ESRI world, JavaScript seems to have dropped off to near nothing relative to FX and SL.
posted by klanawa at 3:46 PM on June 17, 2010

Best answer: I've worked with both Flash and jQuery on very large, UI-intense applications, and feel pretty strongly that Flash or Flex is not going to be a productivity gain for a primarily data entry based web app, especially given this:

There seems to be a certain point and I just get lost and things get ugly.

...which makes it sound like the language isn't actually your problem. You're going to get ten times as lost in Flash, though, because you'll wind up having to cope with handing data back and forth from the plugin to the html; you're just adding another layer of complexity to the stack of things you need to cope with. Flash is great if you have UI needs that aren't easily supported in the browser (maps are a fine example, or anything graphically intense) but if you're just handling data entry there's no real good reason to use it.

jQuery For Designers has some excellent walkthroughs of developing various widgets using jQuery -- don't be put off by the name, I think it does a pretty good job of showing the jQuery way of doing things with some very solid examples.

(Basically: don't write one big object for your whole workflow. Write lots of tiny objects that do one simple thing each, whether that's validating a bit of data or controlling a widget on screen, then drop them into your html by applying them to given classnames. Use your HTML tree itself as your data storage, rather than trying to keep javascript data objects in synch with the DOM.)

I've never used ExtJS or Silverlight. YUI sucks balls; avoid at all costs.

as opposed to the mockery that is "object-based" JS

Them's fightin' words, cowboy.
posted by ook at 5:43 PM on June 17, 2010 [3 favorites]

Response by poster: Wow these are great suggestions, I believe you are right ook, now that I think about it, I don't really have very much complex UI experience and I'm probably not implementing the best design patterns.

I should probably go back to the GoF book and figure out a better way to organize the entire project.

Re: Module pattern. Funny enough I was sort of doing this without even thinking about it.
posted by geoff. at 9:59 AM on June 18, 2010

Best answer: JavaScript:The Good Parts, the Douglas Crockford book whcih that pattern is in, is well worth a read as well. And it's short! (insert joke here)
posted by Artw at 10:04 AM on June 18, 2010

Best answer: insert joke here

Okay. (But, seriously, Javascript programmers should read it.)
posted by Zed at 10:57 AM on June 21, 2010 [4 favorites]

Response by poster: I've actually found that it helped to use Pyjamas.
posted by geoff. at 12:39 PM on July 18, 2010

« Older Quirky fun for adults and kids to have together   |   What is the ultimate answer to life, the universe... Newer »
This thread is closed to new comments.