Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Sammy.js 0.3.0 Released
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aaron Quint  
View profile  
 More options Sep 30 2009, 11:18 am
From: Aaron Quint <aa...@quirkey.com>
Date: Wed, 30 Sep 2009 11:18:50 -0400
Local: Wed, Sep 30 2009 11:18 am
Subject: [ANN] Sammy.js 0.3.0 Released
Hey All

Its been almost a month in progress, but the next branch has finally
been brought into master. (yay!)

Theres a blog post here:
http://www.quirkey.com/blog/2009/09/30/sammy-0-3-0-released-i-gotta-r...

Regarding this list and the community there are two big announcements:

1 - Plugins

I've started an official plugin repository. If you have an awesome
piece of code or a template engine, now theres a way to create a
plugin, so that any Sammy user can easily include it in their app. I'd
love contributions from the community or any suggestions for cool
plugins.

2 - Resources/Links page

I've added a "Resources" page to the github pages:
http://code.quirkey.com/sammy/resources.html

If theres a link/blog post/project that I didn't put up, or something
you create that you think should be up there - let me know!

Thanks to everyone who helped with this release!

Heres a full CHANGELOG (pretty big):

== 0.3.0 [09/28/09]

New:
  - Sammy.Application#use() takes an app function and applies it to
the current app. This is the entry point for Sammy Plugins. See docs
at: http://code.quirkey.com/sammy/docs/plugins.html
  - New system for repository structure, minified files are placed in
lib/min/ version numbers are appended to minified files
  - Sammy.EventContext#partial() is template engine agnostic and calls
the template engine method based on the extension of the file you're
trying to render.
  - New official Sammy.Cache plugin provides simple client side caching
  - Sammy.EventContext#redirect() can take any number of arguments
that are all joined by '/'
  - Sammy.Application#refresh() will re-run the current route

Changes:
  - Removed John Resig's Class() inheritance code/style in favor of
doing prototypical inheritance and using $.extend()
  - Sammy.Application bind() and trigger() now use jQuery's built in
namespacing. This means that a Sammy application can now catch events
like clicks and other events that bubble up or are triggered on the
Sammy.Application#element()
  - Sammy.log and Sammy.addLogger are top level access to logging and
adding additional logging paths. Sammy.Application#bindToAllEvents()
replaces the functionality for the former addLogger() method
  - the app functions and route callbacks both take _this_ as the first argument
  - $.srender and template() are no longer part of the sammy.js and
are instead included in the Sammy.Template plugin
lib/plugins/sammy.template.js
  - Routes are saved and looked up in order of definition instead of
shortest first (May break existing applications that use RegExp based
routing)
  - Made the parse query more uniform with the rest of the code base
  - Sammy.Object#toString() wont include functions unless you
explicitly want them

Fixes:
  - Fixed redirect() handling in post routes
  - Fixed param parsing for form submission where there were multiple
params with the same name

--AQ

Aaron Quint
http://www.quirkey.com


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marak Squires  
View profile  
 More options Oct 1 2009, 7:48 pm
From: Marak Squires <marak.squi...@gmail.com>
Date: Thu, 1 Oct 2009 16:48:51 -0700 (PDT)
Local: Thurs, Oct 1 2009 7:48 pm
Subject: Re: Sammy.js 0.3.0 Released
Looking good Aaron! Can't wait to see whats next.

$.srender and template() make way more sense as plugins then being
part of the core.

I still don't think _checkLocation should be the primary way of
navigating though routes though. I'd rather see runRoute() be event
driven then interval driven. The problem obviously is the back button
working in the browser but I think _checkLocation could still be used
to trap this condition and the primary routing mechanism could be done
through an IOC container.

-Marak Squires

On Sep 30, 11:18 am, Aaron Quint <aa...@quirkey.com> wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aaron Quint  
View profile  
 More options Oct 1 2009, 7:53 pm
From: Aaron Quint <aa...@quirkey.com>
Date: Thu, 1 Oct 2009 19:53:49 -0400
Local: Thurs, Oct 1 2009 7:53 pm
Subject: Re: [sammy.js] Re: Sammy.js 0.3.0 Released
Marak

I think the next big thing besides expanding the plugin repository is
reworking the checkLocation piece. My thinking now is that there will
be a seperate plugin (included by default) that handles the hashchange
as an event. It will use the native onhashchange event in browsers
that support it (latest IE, Firefox, Safari) and fall back to a single
setInterval() per page instead of per-app. I see what you're saying
with the not wanting to use an interval at all, but I really really
like the ability to just change the hash/url in the location bar and
have it the app react.

Thanks for the feedback! I'd love to keep this discussion going,
--AQ

Aaron Quint
http://www.quirkey.com


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[ANN] Sammy.js 0.3.0 Released" by Todd Willey
Todd Willey  
View profile  
 More options Oct 1 2009, 7:57 pm
From: Todd Willey <t...@rubidine.com>
Date: Thu, 1 Oct 2009 19:57:44 -0400
Local: Thurs, Oct 1 2009 7:57 pm
Subject: Re: [sammy.js] [ANN] Sammy.js 0.3.0 Released
Thanks, I'm super-excited about this!  More comments/questions inline.

On Wed, Sep 30, 2009 at 11:18 AM, Aaron Quint <aa...@quirkey.com> wrote:

> Hey All

> Its been almost a month in progress, but the next branch has finally
> been brought into master. (yay!)

> Theres a blog post here:
> http://www.quirkey.com/blog/2009/09/30/sammy-0-3-0-released-i-gotta-r...

Very helpful, esp. the bind/trigger example.  I'm excited about
screencasts as a marketing tool as well.

> Regarding this list and the community there are two big announcements:

> 1 - Plugins

> I've started an official plugin repository. If you have an awesome
> piece of code or a template engine, now theres a way to create a
> plugin, so that any Sammy user can easily include it in their app. I'd
> love contributions from the community or any suggestions for cool
> plugins.

In the blog post, it has you including the plugin's javascript (after
sammy.js) and then you are calling it inside an application callback.
Does this mean each plugin has to be enabled per-application on a
page, or is there some way to enable it once for all applications on a
page?

I end up using the native JQuery ajax methods load/get/post instead of
srender.  Moving this into a plugin is a plus, I think.

Thanks!  Looking forward to giving it a test run.

> --AQ

> Aaron Quint
> http://www.quirkey.com

--
CONFIDENTIALITY NOTICE:  This email is for sole use of intended
recipient(s).  Unauthorized use is prohibited.

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marak Squires  
View profile  
 More options Oct 1 2009, 8:53 pm
From: Marak Squires <marak.squi...@gmail.com>
Date: Thu, 1 Oct 2009 20:53:19 -0400
Local: Thurs, Oct 1 2009 8:53 pm
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released

Aaron -

I agree with the functionality of being able to manually change the
location.hash is a good thing and I wouldn't want to remove it completely by
any means.

onhashchange isn't fully implemented cross-browser yet, but it would be
great to start including future support for this.

The only thing that bothers me a bit is the idea of using a 50ms polling
interval to constantly check if the application has entered a new state. It
seems a bit "dirty", but perhaps it is the best choice based on the nature
of JavaScript and the browser? Ideally you would want to have everything
properly event driven, but the lack of onhashchange support causes the
problem.

On a bit of a side note I am working on a similar project to Sammy and I
think there is nothing but room for improvement in this area of software
development. I think a lot of the work I am doing could help Sammy and vice
versa. I will be around the IRC to continuing discussing this further.

-Marak
(aka JimBastard)


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aaron Quint  
View profile  
 More options Oct 1 2009, 11:04 pm
From: Aaron Quint <aa...@quirkey.com>
Date: Thu, 1 Oct 2009 23:04:03 -0400
Local: Thurs, Oct 1 2009 11:04 pm
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released
Hey Todd

Replies inline:

Please let me know if you have other ideas/things you want to see more of.

Yes, currently you would have to enable them in every application. If
you're really keen on extending everything you can extend the
Sammy.Application.prototype or the Sammy.EventContext.prototype. I'd
make this a last resort as you might get into trouble with conflicts
down the line. An easy thing to do though is to build a meta-plugin
that includes many other plugins and just include that every time.
e.g.

var MetaPlugin = function(app) {
  app.use(Sammy.Template);
  app.use(Sammy.Cache);
  app.use(MyOtherPlugin);

};

$.sammy(function(app) {
  app.use(MetaPlugin);

});

I've also thought about creating a bundler kind of like the way
jquery-ui works, where you select the plugins/packages you want and it
could concatenate them into a single file (maybe even include jquery,
too). Maybe a little early, but down the line it could be cool.

Awesome! Let me/this list know how it goes or if you have questions/bug reports.

--AQ


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aaron Quint  
View profile  
 More options Oct 1 2009, 11:07 pm
From: Aaron Quint <aa...@quirkey.com>
Date: Thu, 1 Oct 2009 23:07:28 -0400
Local: Thurs, Oct 1 2009 11:07 pm
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released
Hey Marak

I think we're on the same page here. The key will be that the the
polling will just fire the event, so maybe there will be a
configuration option that turns off polling completely, and you 're
responsible for firing the hashchange event. In general I dont think
setInterval is too evil. I think relying on it exclusively in general
instead of events and having hundreds of them on a page could cause
issues, but I think a single one, polling a single value wont really
cause any harm.

--AQ


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marak Squires  
View profile  
 More options Oct 2 2009, 10:31 am
From: Marak Squires <marak.squi...@gmail.com>
Date: Fri, 2 Oct 2009 10:31:49 -0400
Local: Fri, Oct 2 2009 10:31 am
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released

Aaron -

Any suggestions on how to detect if hashchange is a viable event? I've
researched a bit and all I could find were people checking the browser
version and maintaining a list of browsers which supported it.

-Marak


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Todd Willey  
View profile  
 More options Oct 2 2009, 10:33 am
From: Todd Willey <t...@rubidine.com>
Date: Fri, 2 Oct 2009 10:33:53 -0400
Local: Fri, Oct 2 2009 10:33 am
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released

* Using partial, esp with a callback param to update an area different
from the app's $element().
* Saving params from a post and redirecting to a get, to insert the
change into the page history
* Using $element().trigger('changed') if you update content manually
(not partial()), esp if you're adding a form.

--
CONFIDENTIALITY NOTICE:  This email is for sole use of intended
recipient(s).  Unauthorized use is prohibited.

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Todd Willey  
View profile  
 More options Oct 2 2009, 10:39 am
From: Todd Willey <t...@rubidine.com>
Date: Fri, 2 Oct 2009 10:39:35 -0400
Local: Fri, Oct 2 2009 10:39 am
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released
Maybe the first time .run() is called, before it boots the application
it could set a hashchange listener,
document.location.href='#/hashtest', then window.history.go(-1) and if
the listener gets called in that process it sets a flag.  Then the
listener is removed and the app continues booting normally.  It is a
little invasive, but might have potential.

Maybe a plugin could do it.  bind('run') in the app when included.
When called do the navigation trick.  clearInterval on app._interval
if hashchange works, and set up the listener.

-todd[1]

--
CONFIDENTIALITY NOTICE:  This email is for sole use of intended
recipient(s).  Unauthorized use is prohibited.

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marak Squires  
View profile  
 More options Oct 2 2009, 10:42 am
From: Marak Squires <marak.squi...@gmail.com>
Date: Fri, 2 Oct 2009 10:42:07 -0400
Local: Fri, Oct 2 2009 10:42 am
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released

Todd -
Wouldn't that result in url bar flickering for a moment as it ran this test?
I thought up the same solution but really didn't think it was viable.

-Marak


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Todd Willey  
View profile  
 More options Oct 2 2009, 11:15 am
From: Todd Willey <t...@rubidine.com>
Date: Fri, 2 Oct 2009 11:15:18 -0400
Local: Fri, Oct 2 2009 11:15 am
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released
It would, that's why I called it invasive.  I just think testing for
actual behavior is better than matching a browser version, since there
are times such a list is guaranteed to be incomplete.  That being
said, I don't really mind the polling.  I've been using sammy for
about 3 months and haven't experiences any page slowdown yet, though
if I had I suspect it might be one of my first sources of
optimization.

-todd[1]

--
CONFIDENTIALITY NOTICE:  This email is for sole use of intended
recipient(s).  Unauthorized use is prohibited.

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aaron Quint  
View profile  
 More options Oct 2 2009, 11:17 am
From: Aaron Quint <aa...@quirkey.com>
Date: Fri, 2 Oct 2009 11:17:17 -0400
Local: Fri, Oct 2 2009 11:17 am
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released
I'm pretty sure theres a way to check for the presence of system
events as properties of the window:

e.g. if (window.onhashchange)

Either way, I need to do some more research on this,

--AQ

Aaron Quint
http://www.quirkey.com

...

read more »


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marak Squires  
View profile  
 More options Oct 2 2009, 11:18 am
From: Marak Squires <marak.squi...@gmail.com>
Date: Fri, 2 Oct 2009 11:18:01 -0400
Local: Fri, Oct 2 2009 11:18 am
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released

Until hashchange is fully supported the polling is inevitable. Having one
poll running at 50ms to detect state changes is a necessary evil for now.

-Marak

...

read more »


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Todd Willey  
View profile  
 More options Oct 6 2009, 3:11 pm
From: Todd Willey <t...@rubidine.com>
Date: Tue, 6 Oct 2009 15:11:26 -0400
Local: Tues, Oct 6 2009 3:11 pm
Subject: Re: [sammy.js] Re: [ANN] Sammy.js 0.3.0 Released

Nice!  $form keeps getting added to my posts when I call
params.toHash().  Not a big deal, but not expected, either.

--
CONFIDENTIALITY NOTICE:  This email is for sole use of intended
recipient(s).  Unauthorized use is prohibited.

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google