× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Henrik,

I get your point about putting comma, open brace, & close brace delimiters on
new lines. That makes JSON more readable. The indents don't appear in the
Web400 list, but I can see how that would help readability too.

-Nathan



----- Original Message ----
From: Henrik Rützou <hr@xxxxxxxxxxxx>
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Sent: Thu, October 14, 2010 1:49:19 PM
Subject: Re: [WEB400] Sencha Touch

Aaron,

for me there is at the moment 3 techology stades:

WEB 1.0, written in HTML with the data embedded in tables and very little
javascript.

WEB 2.0 written in XHTML/Javascript/AJAX and with data rendered into the
XHTML

RIA written in OOjavascript (in a MVC perspective alle View-program code
runs in the client)
and with "NO DATA" in the code. All is served by the ckient calls back to a
monolithic
program that also served the client its view oprogram or in a SOA to a
Remote Procedure
that hasn't got anything to do with the serving of client program and
thereby the view.

Nathan & Aaron

configuring screens is exactly what I do and that is why I have a data
dictionary that
hold metadata that just is combined via s simple XML defintion to EXTJS JSON
templates.

How it is done isn't any secret and it gives you also the "userdefined
screen's"
based on userrules .. http://powerext.com/powerEXT_SOA.pdf

JSON isn't so hard to do or read if it is done right. Back in start of 2009
I had
psycologist (experts in LEAN) to analyse the best way to code and fastes
way to read.

There are two rules:

Do indentens consequently, JSON is jost a hirachical structure as XML, HTML,
javascript etc.

Do put comma's in front of the statement, it speeds up reading (and
mindchecking)
by 300%. This has something to du with eye movement, where jo has to go both
vertical and horisontal if the comma is in the back while you you only moves

vertical and indents hven the comma is in the front. Besides that a missing
comma
(the most known error) will stick out visually in a matter of microseconds
in you
brain.

Just try to follow the end or the start of these statements

// extTemplate: /powerEXT/STD/alpha.asp Tag: alpha_ExtJS3_grid
{header:"Web User Id."
,width:195
,dataIndex:"WAWUSR"
,align:"left"
,sortable:true
}
,
// extTemplate: /powerEXT/STD/alpha.asp Tag: alpha_ExtJS3_grid
{header:"Web User Name"
,width:325
,dataIndex:"WAWUNA"
,align:"left"
,sortable:true
}
,
// extTemplate: /powerEXT/STD/combo.asp Tag: combo_ExtJS3_grid
{header:"Language Code"
,width:84
,dataIndex:"WALNGC"
,align:"left"
,sortable:true
}
,
// extTemplate: /powerEXT/STD/alpha.asp Tag: alpha_ExtJS3_grid
{header:"Mail Address"
,width:500
,dataIndex:"WAMAIL"
,align:"left"
,sortable:true
}
,
// extTemplate: /powerEXT/STD/combo.asp Tag: combo_ExtJS3_grid
{header:"Web User Class"
,width:91
,dataIndex:"WAWUSC"
,align:"left"
,sortable:true
}
,
// extTemplate: /powerEXT/STD/alpha.asp Tag: alpha_ExtJS3_grid
{header:"Web User Type"
,width:84
,dataIndex:"WAWUTY"
,align:"left"
,sortable:true
}

The other thing is that Ext JS is OO jacascript with a steep learningcurve
because it can do so
many things and because it is very har to understand what scope you har in
and how to handle
events and communications between object in different scopes.

This is not an iSeries or RPG programmer problem, Sencha's forum is full of
this treads with
people running PHP ASP.NET and java - it's just a hard framework to learn,
but Google GWT
isn't easier, RIA is just complicated.



On Thu, Oct 14, 2010 at 8:42 PM, Aaron Bartell <aaronbartell@xxxxxxxxx>wrote:

Hi Nathan,

I fully agree that JSON and ExtJS syntax is messy. The JSON
messy-ness is resolve by having JSON composer/parser on both ends (in
ExtJS and RPG), and the Firebug plugin for Firefox has a nice JSON
renderer that I use for debugging.

The ExtJS syntax I am still working on. I hope to eventually store
the properties of a screen/panel in a DB2 table and have "render kits"
that take the DB2 data and render it to a particular UI framework
(i.e. ExtJS, SenchaTouch, jQTouch, Android, iPad, etc).

In the end though, I would still argue that even with the messy ExtJS
syntax it is much easier/quicker for me to code an application than
CGIDEV2. After awhile you get good at the syntax - it's just
Javascript arrays.

Aaron Bartell
http://mowyourlawn.com
http://mowyourlawn.com/blog/



On Thu, Oct 14, 2010 at 1:18 PM, Nathan Andelin <nandelin@xxxxxxxxx>
wrote:
From: Aaron Bartell
I am also liking how these latest js frameworks are allowing and
focusing on configuring "screens" and all we need to do is show/hide
them and occupy them with information. Soooo much easier than the
traditional CGIDEV2 I grew up on - at least in my opinion.

Now I'm curious what you like about "configuring screens"? Looking at an
HTML
page source where ExtJS code was for "configuring screens" makes me
wonder what
you like about it? I find that long streams of JSON formating are hard
to read
and hard to maintain, particularly with all the delimiters. One of the
guys in
our user's group is learning Valence, and commented that the RPG code is
fine,
but the JavaScript is hard. I assumed he meant that coding in JSON is
hard.

-Nathan




--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.