[OpenAjaxIDE] Agenda for tomorrow: Review Widget Metadata chapter

Jon Ferraiolo jferrai at us.ibm.com
Tue Aug 4 16:06:43 PDT 2009


I guess the key question is whether a small subset of date formatting is
acceptable, such as what Steve includes in xDate. If a small subset, then
it's a small amount of code, and no big worries. For simplicity, everyone
has the option to include that date formatting code always. However, if you
want lots of date formatting features and full-blown internationalization,
then we are talking about a large block of code, which to me smells like it
would be a mistake given the relative size of the code to implement the
date formatting feature versus the whole rest of the spec.

I think we need to hear from Kin how much formatting flexibility and
internationalization support he needs.

Jon




                                                                                                                                 
  From:       Bertrand Le Roy <Bertrand.Le.Roy at microsoft.com>                                                                    
                                                                                                                                 
  To:         Jon Ferraiolo/Menlo Park/IBM at IBMUS, Steve Repetti <steve at radwebtech.com>                                           
                                                                                                                                 
  Cc:         "ide-bounces at openajax.org" <ide-bounces at openajax.org>, "ide at openajax.org" <ide at openajax.org>                       
                                                                                                                                 
  Date:       08/04/2009 02:55 PM                                                                                                
                                                                                                                                 
  Subject:    RE: [OpenAjaxIDE] Agenda for tomorrow: Review Widget  Metadata    chapter                                          
                                                                                                                                 





Yes, ours is also a few hundred lines of code (for both parse and format),
plus a blob of JSON data for each culture and special optional support for
non-Gregorian calendars. It’s a lot of work (and tricky to get right too).
Better to re-use something existing or provide a simple, non-localized
implementation and allow for more elaborate providers to plug-in?

From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org] On Behalf
Of Jon Ferraiolo
Sent: Tuesday, August 04, 2009 12:12 PM
To: Steve Repetti
Cc: ide-bounces at openajax.org; ide at openajax.org
Subject: Re: [OpenAjaxIDE] Agenda for tomorrow: Review Widget Metadata
chapter



Two questions:

* Internationalization: Aren't there complexities with date formatting
having to do with the current locale? The dojox logic includes several
files having to do with internationalization, including a few Hebrew*.js
and IslamicDate.js (545 lines of JS).

* Code size: Does anyone have is a guesstimate about how many lines of
JavaScript code would be needed to implement @@dataformat()@@. Steve's
features appear to be a subset of the PHP features. Our open source widget
loader is 1760 lines of JavaScript. The dojox file that implements PHP's
date features is 308 lines, but when you add in the Hebrew and Islamic
stuff, the dojox date routines will be roughly the same size as the rest of
the widget loader.

Jon



Inactive hide details for "Steve Repetti" ---08/04/2009 11:29:30 AM---I
have written an xDate JavaScript class which does a ton"Steve Repetti"
---08/04/2009 11:29:30 AM---I have written an xDate JavaScript class which
does a ton of date formatting, and includes an extern


                                                                           
                                                                           
 From:          "Steve Repetti" <steve at radwebtech.com>                     
                                                                           
                                                                           
 To:            "'Kin Blas'" <jblas at adobe.com>, <ide at openajax.org>         
                                                                           
                                                                           
 Date:          08/04/2009 11:29 AM                                        
                                                                           
                                                                           
 Subject:       Re: [OpenAjaxIDE] Agenda for tomorrow: Review Widget       
                Metadata chapter                                           
                                                                           
                                                                           
 Sent by:       ide-bounces at openajax.org                                   
                                                                           






I have written an xDate JavaScript class which does a ton of date
formatting, and includes an externalized function dateFormat( dte, fstr ):

// Supported formats:

// mm = month as "1" dd = day as "1" YY = day as "01"
// MM = month as "01" DD = day as "01" YYYY = day as "2001"
// MMM = month as "Jan" DDD = day as "1st"
// MMMM = month as "January" DDDD = day as "Saturday"

// time:
// hh = hour as "05" (12-hour clock) MN = minutes as "01" ap = am/pm as
"am"
// HH = hour as "17" (24-hour clock) SS = seconds as "01" AP = am/pm as
"AM"
// SSSS = milliseconds as "0001"

As in: dateFormat( null, “The date is MMMM, DD, YYYY and the time is
HH:MN:SS” )


I would be more than happy to donate it to the cause if anyone wants (I
wrote it as part of my www.xwinlib.com library).

Let me know,

Steve Repetti
www.radwebtech.com
www.scrapplet.com



From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org.] On Behalf
Of Kin Blas
Sent: Tuesday, August 04, 2009 1:52 PM
To: ide at openajax.org
Subject: Re: [OpenAjaxIDE] Agenda for tomorrow: Review Widget Metadata
chapter

Unfortunately, I won’t be able to make the meeting today due to a
last-minute internal conflict which I can’t get out of. I will also be on
PTO Wednesday through next Tuesday so I won’t be available via email.

I have not had a chance to link up with Lori, but what I did have in mind
was something similar to the PHP or Unix style date formatting where
variable substitutions are made:

<p>Euro-Style: @@formatdate(myDate,”d/m/Y”)@@</p>
<p>Western Style: @@formatdate(myDate,”m/d/Y”)@@</p>

This would be the most flexible as opposed to having built-in canned
formatted dates. Of course this would mean we would have to adopt the
PHP/Unix variables (desireable), or come up with our own (less-desireable).

--== Kin ==--

From: ide-bounces at openajax.org [mailto:ide-bounces at openajax.org.] On Behalf
Of Jon Ferraiolo
Sent: Monday, August 03, 2009 11:35 AM
To: ide at openajax.org
Subject: [OpenAjaxIDE] Agenda for tomorrow: Review Widget Metadata chapter


The main topic for tomorrow's phone call is detailed review of the Widget
Metadata chapter:

*
http://www.openajax.org/member/wiki/OpenAjax_Metadata_1.0_Specification_Widget_Metadata


Kin and Lori were also going to look into a proposal for a date formatting
function. Regarding that topic, I did some web searches. It appears that
ExtJS and Dojo (in dojox:
http://api.dojotoolkit.org/jsdoc/1.3/dojox.date.php.DateFormat) have both
offered JavaScript APIs that implement a subset of PHP's date formatting
features. Also, the ServerJS crowd are talking about offering a date
formatting feature that is also derivative of PHP's date formatting
features. (http://www.mynajs.org/shared/docs/js/libOO/files/Date-js.html)
Adam has been making comments to the ServerJS crowd that they should focus
on core features and treat date formatting as something that can be
provided by an add-on JavaScript library.

Thanks to Lori for the editorial work on the cover page and chapters 1 and
2._______________________________________________
IDE mailing list
IDE at openajax.org
http://openajax.org/mailman/listinfo/ide




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/ide/attachments/20090804/1830ea7e/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20090804/1830ea7e/attachment-0002.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://openajax.org/pipermail/ide/attachments/20090804/1830ea7e/attachment-0003.gif 


More information about the IDE mailing list