scott galloway's personal blog...
posts - 916, comments - 758, trackbacks - 11

My Links



Post Categories

Misc. Coding

Monday, January 24, 2011

In a new world, my new job and coming to terms with ExtJs

After over a year away from them, I'm busy at my new job in Glasgow with Dell (you know, they make the big black computers) as a Senior Dev Lead (I think, titles are still a bit mixed up). Loving being back working with a team; though I've spent most of my time sniping from the sidelines...the beginnings of my influencing the future direction our application takes. This is a bit of a departure for me, I'm used to developing very high scale and performance apps for internet use, but this one has a more limited audience (so far!) . The app I'm working on is the one used by the Dell factory and corporate customers for defining the 'images' written on to machines at the factory...and new machines in IT departments. So before you I don't write the crapware, but our app is used to write it to the machines (sorry!).

Anyway, the app I'm working on is pretty interesting, very MS based, uses an SOA architecture and ExtJS as a front end. Kind of uses MVC 2 (just a very thin layer used to provide JSON through ExtJs.Direct.MVC).
ExtJs is an interesting beast...essentially and entirely client side UI framework which bumps all it's templates and code down to the browser in one big file (we use script combining and compression). From then on, you app UI is instantiated entirely on the client...for an old jQuery / Server-side coder like me this is a bit shocking. I understand the theory behind essence all you require from the server after the first load is the JSON which represents the data each 'page' requires (though really each 'operation').
My biggest issue with this approach is: Javascript is a sucky language to build UI with. There, I've said it! Now don't get me wrong, I love Javascript, books like those I recommend below really have over the past year or two really rekindled my love of Javascript (along of course with the superlative jQuery).

My main issue with ExtJS is that is defines the templates it uses entirely in code...and any customization to those templates (size, contents etc...) is also performed using Client-Side code. Looking at the codebase of a reasonably large application like our, I can see well over 200 individual JS files which typically map to operations. Frankly, it's a bit of a pain to read this stuff and update it. Validation logic, text strings containing content etc...are all encapsulated in these files along with operation -> operation flow information.

Anyway, unfortunately I've joined the team when we're just about to do our first it's WAY too late to change (and frankly we have a huge investment in this). My preference is to write UI using server side code to generate HTML (with Razor pages of course!) and load initial data in to the UI using this server side code (whether through partial views and jQuery or just direct rendering to the browser). AJAX is awesome and when used properly can give a very responsive UI...for example, when saving data from a page back to the server, I would always use AJAX these days and give validation feedback direct to the page. Well anyway, enough of the rant. There's lots of places where I *can* make improvements...and hey, it's a good job right!

Sometimes, no matter how much you want to change stuff you just have to live with it!

posted @ Monday, January 24, 2011 1:57 AM | Feedback (0) | Filed Under [ .NET ASP.NET JQuery ]

Powered by: