Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: A simple Native JS app skeleton?  (Read 17417 times)
zermattchris
Full Member
***
Posts: 35


View Profile Email
« on: February 11, 2012, 04:53:55 »

Hi Cliff & Co.,

Just wondering if one you of core devs might be able to quickly put together a super simple/minimal Application Skeleton using the Native JS port and define()?

Cheers,
-Chris
Logged
davidfoley
Moderator
Newbie
*****
Posts: 8


View Profile Email
« Reply #1 on: February 11, 2012, 06:03:24 »

Hi Chris- we're working on a number of ports at the moment, which may help there. I like the idea of a 'default' project though, something to aid a quick jump in... is that more in keeping with what you're thinking?
Logged
zermattchris
Full Member
***
Posts: 35


View Profile Email
« Reply #2 on: February 11, 2012, 06:45:32 »

Hi David,

Yes, I think that an absolute minimal project would be both the fastest/easiest for you guys to chuck together and also the logical starting point for people trying out the Native port. For my money it doesn't even need to have an UI or any comms, just a working error-free skeleton, using the new native define() syntax.

After this is available, maybe a couple of more ultra-simple discovery apps could be built, before a newbie gets dropped into the Box Splash & Employee Admin demos (which can be pretty intimidating when one is first confronted with PureMVC)?
Here are a couple of rough ideas from following here for a while:

   
  • Hello World -- simple UI example
  • Multi-core -- how it relates to building larger, organised (modular?) js apps with PureMVC
  • Hello World Plus -- An extended UI example, that might use some sort of UI helper (see this done repeatedly in other ports, so guessing it's a good idea).
  • (...here would come the standard Box Splash & Employee Admin demos...)
  • (...more advanced utilities demos...)

This way there would be a nice progression from the most minimal, to a complete functioning PureMVC Native JS app -- and each step in the progression would be very small and (hoping!) easy to follow/understand.

As always, a nice post (blog) somewhere aimed at those of us who are still quite new to PureMVC would be great!  :)

Cheers,
-Chris
Logged
zermattchris
Full Member
***
Posts: 35


View Profile Email
« Reply #3 on: February 15, 2012, 03:46:02 »

Hi David,

I can imagine that you're busy as hell with a myriad of projects...

...if you'd like to, you could drop me a running native js project of some sort and I'll try and distill it down to an App Skeleton. As my skills in the PureMVC dept are rather lacking at the moment, it might require a bit of polish on your end, but that might save you a bit of time and allow me to start getting involved (as opposed to just asking for things on the forums all the time!).

Cheers,
-Chris

Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #4 on: February 15, 2012, 02:43:25 »

I think David's down for the count today, but we're going to have a chat about this tomorrow and see what we can do to get a bare bones hello world together. I think it should be Native port / puremvc.define() for classes / DOM UI to start, so as to remove all distractions.

-=Cliff>
Logged
zermattchris
Full Member
***
Posts: 35


View Profile Email
« Reply #5 on: February 16, 2012, 02:44:48 »

Sounds great Cliff - sorry to be such a nag  ;)
-Chris

PS. Let me know if I can help somehow...
Logged
Tekool
Sr. Member
****
Posts: 192


View Profile WWW Email
« Reply #6 on: February 16, 2012, 05:35:59 »

If you have not yet chosen which skeleton app to use you can have a look at the infamous Todo App example : https://github.com/addyosmani/todomvc this guy use this app to compare most used JavaScript MVC frameworks (look at the number of people following this github project).

Here is also a page presenting top 10 JavaScript MVC frameworks :
http://codebrief.com/2012/01/the-top-10-javascript-mvc-frameworks-reviewed/

They do not list Dojo, Zepto but there's also those ones.
« Last Edit: February 16, 2012, 05:39:15 by Tekool » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #7 on: February 16, 2012, 02:46:27 »

Hey, great suggestion Frederic! I ran across that the other day and thought we should get to that myself. Totally forgot about it. Looks like I need a better way of keeping up with my todos.... :)

-=Cliff>
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #8 on: February 22, 2012, 05:36:28 »

Attached is a simple hello world I got from David today. It will change a bit before becoming a full-fledged demo, but it does demonstrate in a single page the simple reversal and redisplay of a string, on each keystroke or when clicking a button.

It uses JQuery for UI controls but the puremvc.define() method for creating classes. David was concerned about having to do a lot of acrobatics to support IE in a DOM-only demo. I told him I thought we could just do a DOM-only version that ignores IE for the moment. Since developers know you have to either use a UI lib like JQuery OR jump through hoops to do it it yourself, it isn't relevant to a minimal DOM-only hello world. He's going to go ahead and create one of those.

-=Cliff>
Logged
zermattchris
Full Member
***
Posts: 35


View Profile Email
« Reply #9 on: February 23, 2012, 01:38:28 »

Thanks Cliff (and David!),

Can't wait to dig in and give it a whirl. Yes, skipping the IE bit for a super basic demo is perfect - reduces the cruft and lets one concentrate on getting just the concept working (I'm only doing dev work for Webkit, so even better in my case!).

Many thanks to all involved for the efforts. Greatly appreciated!  :)

-Chris
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #10 on: February 23, 2012, 12:21:09 »

Chris,

Thanks for your patience as we get this stuff worked out.

One thing youll notice in Davids JQuery demo (which I believe will look very similar to the DOM demo), is that hes skipping the whole process of creating a concrete Facade by simply registering a startup command and notification when creating the Facade. In AS3, the best practice is to shield the application from knowing too much about the PureMVC apparatus. But in the case of JS, I suppose it may be acceptable, but I dont yet know about calling it a best practice.

-=Cliff>
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #11 on: February 27, 2012, 10:34:40 »

Here is the announcement of the official release of the JS Reverse Text Demo.
http://forums.puremvc.org/index.php?topic=2008.0

After David submitted it I refactored it a bit, moving the processing of the text out of the Proxy and into the ProcessTextCommand (where business logic like this should go), using the Proxy to store the data and notify the app about changes to it. I also added a little more logic to the ProcessTextCommand to check for and notifiy the view about palindromes detected in the input. This gives the TextComponentMediator two notifications from different sources to be interested in.

This was my first experience using the PureMVC Native port, For someone who has always been extremely wary of JS, I must say, I was pleasantly surprised with the experience.

-=Cliff>
Logged
zermattchris
Full Member
***
Posts: 35


View Profile Email
« Reply #12 on: February 28, 2012, 05:57:35 »

I've just had a quick look at the demos and they seem to be very clear and easy to follow -- great effort guys!
-Chris
Logged
Pages: [1]
Print