[Dojo-interest] Large Dojo Application Design

Mattew Shirey mshirey at gmail.com
Thu Aug 28 02:55:05 UTC 2008


Thank you for your post.  Though I think it misses the point of the  
question I'm trying to ask.  I'm already experienced with using dojo.   
Though I would not call myself another more than a novice.  I started  
with 0.4 and have ridden the exciting development path to 1.1.  I'm  
quite familiar with everything you've outlined here.

I'm looking for something more advanced.  I'm looking for a well  
organized way to use dojo in a very large application with multiple  
developers.  Based on the responses I'm getting, I guess I may be on  
my own on this one.  At this point since I know the author of  
"Mastering Dojo" knows what I'm looking for I guess I should attempt  
to contact him.  At the very least he might be able to help me better  
phrase my questions.  I do apologize that I cannot seem to do better.

-- Matthew


On Aug 27, 2008, at 7:44 PM, V S P wrote:

> Me again..
> want to help
>
> So see if the below helps some
>
> In my scenario I am writting a new application
> In 3 weeks I have about 3K lines of javascript file
> (that's with comments and not 'shrinked')
>
> This is my first web page
>
> I felt with Dojo I was able to skip about 10 years
> of web-based technologies and come back into a mature
> rich UI development world :-) -- as I always felt
> that 90% of the web development 'knowledge' was a workaround
> for HTTP protocol. So now I do not have to worry about this.
>
>
> So first my head was around 'HTML' pages and 'Form' submits
> to talk to the server.
>
> I have totally re-thought that (thanks to Dojo).
> And went back into regular Windows/Xwindows Single Document
> form design (not multi-document).  And then everything
> started making sense.
>
> Now I have One page (documents) with 7 Screens (the mini screens in  
> Dojo
> are called Content Panes)
>
> So those 7 screens (5 of them are 'hidden' by means of Tabbed
> controls and accordion pane)
>
> One non-hidden one is the 'main content pane' which is really
> a Stack of Content pane organized by Tabbed pages
> (using dojo Stack layout)
>
> Those tabbed pages act in my mind like the Web-pages in the
> 'old non-RIA' way of doing things.
>
> With Dojo Pages as Content panes
> do not have to 'submit' to go from one page to another
> -- they are trully like 'windows' or x-windows  Tabbed controls.
>
> So I freely support user going from one page to another
> and depending on what they click I freely decide when to send
> the data back to the server or when to get new data.
>
> And all my communcations back and forth are with JSON, of course
> because I like it (even though I only know it for 3 weeks .. and
> I hate XML :-) )
>
> All the communcations are done with
> dojox.rpc.Service
>
> Most of my content panes are
> dojox.layout.ContentPane
>
>
> If I need to sort data for example, before displaying
> I do it on the client side in dojo instead of doing
> on the server side.
> Because I feel that clients have more CPU cycles then my server.
>
> However unlike server, the clients do not have have much of RAM
> (and Web browser when processing Java scrip use a lot of RAM)
>
> so I do not create 'caching' mechanism where I store results
> of my operations within the client, instead I prefer to 'repeat'
> the lookup in array or a binary tree (typically on ItemFileStore).
>
> Also when I name attributes in JSON files I try to make the names
> short -- because that's the data that goes over the internet...
>
> That's about it as far as the trade offs.
>
> I kind of do not like the fact that Dijit and Dojox portion of the
> dojo do not support Opera -- but it works... so as far as I am  
> concerned
> I support it:
>
> The Firefox Firebug is an indecpensible debugger for Dojo stuff.
> So I debug with Firefox first and then make sure the thing works
> on Safari,IE7 and Opera...
>
>
> Vlad
>
>
>
>
>
>
>
>
> On Wed, 27 Aug 2008 19:09:28 -0700, "Mattew Shirey"  
> <mshirey at gmail.com>
> said:
>> We actually have a completed application that I've written over the
>> last three years.  The application design is quite complete.  I'm
>> attempting to re-write the application with the primary goal of
>> improving usability.  The current application basically uses an old
>> style asp design where each user interface is a separate page.  And
>> there are a LOT of pages and way too many bloated round trips to the
>> web server.
>>
>> I want to reduce the application to a single page or at least a  
>> series
>> of separate pages divided logically but reusing as much of the UI
>> management code as possible.  The back-end of the application is
>> ASP.NET.  I'm using Jayrock for JSON-RPC.  The database is Microsoft
>> SQL Server 2005.
>>
>> Mostly I want to make the application behave more like a standard
>> desktop application instead of old style asp web application.
>>
>> I hope that helps a bit.  Thank you for responding.
>>
>> -- Matthew
>>
>>
>> On Aug 27, 2008, at 6:46 PM, Jay Onda wrote:
>>
>>>
>>> Hey Matthew,
>>>
>>> Im not too sure what you're exactly looking for, so i'll ask a
>>> handful of questions.
>>> im sure other people can contribute to this too. =)
>>>
>>> I know you're trying to keep things simple over email but have you
>>> properly planned out this site?
>>>
>>> Do you know or already have what you need?
>>> Design Comps, wireframes, project plan / design documentation or
>>> something like that?
>>> What are you running for your backend services? java? php?
>>>
>>> Also, Im not sure why you would want a one page app if its so big.
>>> Maybe you can figure out ways to segment it?
>>>
>>> We use dojo (started with 0.2 and finally upgraded to 1.x) but we do
>>> write our own widgets. One of the things we did was to dynamically
>>> load the HTML, CSS and Js files as needed to cut down unnecessary
>>> loading.
>>>
>>> I think the dojo widgeting system (dijit) should do this already (we
>>> had to do it our own way for other reasons). you can always extend
>>> dojo widgets and make them your own too.
>>>
>>> As for Flex, its not bad if its used correctly. Again, it all
>>> depends on what you're trying to accomplish.
>>>
>>>
>>> -jay
>>>
>>>
>>> On Wed, Aug 27, 2008 at 6:33 PM, Matthew Shirey <mshirey at gmail.com>
>>> wrote:
>>> You hit one of my main problems, which is how to ask the right
>>> question.  I know there is no "right" way to create a large dojo
>>> based application, but I would assume that there are some commonly
>>> used conventions.  I'll need a design that is fairly modular.  I
>>> don't need 3000+ line monolithic JavaScript files.  I guess I just
>>> don't know where to start.  All of the examples and tutorials out
>>> there are based on single pages with narrow functionality, not large
>>> applications.  I'm actually having the same issues with Flex.  Flex
>>> seems well suited to single interfaces with narrow functionality,
>>> but every time an application gets to a certain size it just starts
>>> to become monolithic mess.  I know this is just my limited
>>> experience in these areas.  I just need a direction for next steps.
>>>
>>> I'll try to come up with more specific questions and in the mean
>>> time, I'll re-read the sections of the book I referenced.  I've
>>> already been through it a few times, but maybe another run through
>>> will clear it up at least a little more.
>>>
>>> -- Matthew
>>>
>>>
>>> On Wed, Aug 27, 2008 at 5:57 PM, V S P <toreason at fastmail.fm> wrote:
>>> Well,
>>> I am a newbie myself in web programming
>>>
>>> but have been doing non-web development for about 18 years.
>>> (and 14 of them professionally)
>>>
>>> I find that dojo mimics quite well a typicall
>>> Rich gui application frameworks such as wxWindows -- or even more so
>>> QT.
>>>
>>> If you are familiar with Signal/slot concept that is used
>>> in today's C++ UI frameworks, dojo is very similar
>>>
>>> and I think the book you are referring handles those explanations
>>> quite well.
>>>
>>> A book that I use now is Dojo the definitive guide.  It is quite
>>> usefull -- but I have in designed out already all the concepts
>>> as far as what are my Models, what are Viewes and what are  
>>> Controllers
>>>
>>> I also have designed out
>>> how I get the data from the server (and it takes some iteration --
>>> does
>>> not
>>> happen right a way)
>>>
>>> I do not think there is a particular Dojo book on those things --
>>> because
>>> they are not dojo specific.
>>>
>>> An example of Dojo on 'major' site Apple's store.
>>> They use dojo 0.4.  The newer version of dojo as far as I am  
>>> concerned
>>> are light years ahead of 0.4
>>>
>>> Another one is (but as major in terms of name) -- pretty nifty as
>>> far as
>>> functionality
>>> is curehunter.com
>>>
>>>
>>> Many people when they try book examples run into errors due to
>>> some trickery needed to get browsers like FF3 to load the 'file'  
>>> based
>>> java scripts.  I typically download an example -- and just modify  
>>> the
>>> code to point to my versio of dojo source files.
>>>
>>>
>>> Another thing that people get scared about is the size of dojo --  
>>> and
>>> how
>>> it all gets loaded, but for production system you would typically  
>>> use
>>> Dojo's build tool and dojo shrink -- to 'chunck out' and 'shrink'  
>>> only
>>> the pieces that one needs.
>>>
>>>
>>> I am far from finishing my project but sofar I found no need to deep
>>> into any
>>> other library to do anything else.
>>>
>>> I setup OO classes,  inheritance, data structures, signals/slots,
>>> ansyncronious cross domain
>>> calls, data drives for JSON input files -- all using dojo's  
>>> functions.
>>>
>>> And of course -- all the widgets are there.  A data grid where a  
>>> cell
>>> can be
>>> most of the form widgets in dojo is there too (at least it will be
>>> dojo
>>> 1.2 --
>>> dojox.datagrid)
>>> Little later I want to do some additional encryption of some data --
>>> and
>>> dojo
>>> has stuff for encrypt/decrypt as well.
>>>
>>> So sofar I have not found a need to download any additonal java  
>>> script
>>> library.
>>>
>>>
>>>
>>> again the above are just my opinions,
>>> and I am not a web guru by any means.
>>>
>>>
>>> I am sure if you would have a specific question or just
>>> wanted to bounce of an approach -- you will get more specific
>>> responses.
>>>
>>> hope the above is of some use,
>>> VSP
>>>
>>>
>>>
>>> On Wed, 27 Aug 2008 16:59:51 -0700, "Matthew Shirey" <mshirey at gmail.com
>>>>
>>> said:
>>>> I need to design and develop a large RIA and I'd like to use Dojo
>>> since
>>>> I've
>>>> used it a bit in the past.  But I have had trouble finding
>>> examples of
>>>> large
>>>> application designs using Dojo.  I'd like to design this
>>> application to
>>>> load
>>>> in a single page.  In the past I've just added Dojo to many
>>> individual
>>>> pages
>>>> to improve their functionality, but now I'd like to tackle a more
>>> thought
>>>> out and advanced design.  I found one such framework in a book
>>> titled
>>>> "Mastering Dojo" from the Pragmatic Bookshelf.  Unfortunately the
>>> sample
>>>> code included contains many errors and the ideas behind the design
>>> of the
>>>> framework are poorly described and difficult to understand.
>>>>
>>>> Could someone shove me in the right direction?  I'm open to any
>>> ideas at
>>>> this point.
>>>>
>>>> Thank you,
>>>>
>>>> -- Matthew
>>> --
>>> V S P
>>> toreason at fastmail.fm
>>>
>>> --
>>> http://www.fastmail.fm - Email service worth paying for. Try it for
>>> free
>>>
>>> _______________________________________________
>>> FAQ: http://dojotoolkit.org/support/faq
>>> Book: http://dojotoolkit.org/docs/book
>>> Forums: http://dojotoolkit.org/forum
>>> Dojo-interest at dojotoolkit.org
>>> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>>>
>>>
>>> _______________________________________________
>>> FAQ: http://dojotoolkit.org/support/faq
>>> Book: http://dojotoolkit.org/docs/book
>>> Forums: http://dojotoolkit.org/forum
>>> Dojo-interest at dojotoolkit.org
>>> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>>>
>>>
>>> _______________________________________________
>>> FAQ: http://dojotoolkit.org/support/faq
>>> Book: http://dojotoolkit.org/docs/book
>>> Forums: http://dojotoolkit.org/forum
>>> Dojo-interest at dojotoolkit.org
>>> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest
>>
> -- 
>  V S P
>  toreason at fastmail.fm
>
> -- 
> http://www.fastmail.fm - IMAP accessible web-mail
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest at dojotoolkit.org
> http://turtle.dojotoolkit.org/mailman/listinfo/dojo-interest



More information about the Dojo-interest mailing list