|
TrimJunction
JunctionThe open source Junction framework is a conventions-over-configuration, synchronizing web MVC framework for JavaScript.
Show me some code: here are some code snippets comparing Ruby on Rails versus JavaScript on Junction. Junction is your best bet if you want to build single page applications using tried-and-true web MVC paradigms, while letting you leverage new technologies like Google Gears. MoreNews
VisionIn a nutshell: copy Rails when possible, because it's a great web MVC framework. Next, riff on Rails to allow for doing cool, non-Rails maneuvers that are only possible with JavaScript. The result should be a web MVC framework that runs in either the client AND the server (Rhino). While we're at it, explore and push the edges of occasionally connected web applications, providing easy synchronization between distributed code and data. Long version: With an eye towards Don't Repeat Yourself, spiced with a little Ajax, the grand vision of the TrimPath Junction project is to be able to write web application logic just once, in familiar languages like JavaScript. A Junction-based web application should run, validate input, process data, generate output and do its thing on both the server AND the client. We use the Rhino JavaScript runtime for the server and use your favorite, modern web browser for the client. If you know Rails, then Junction will be very familiar stuff. Maybe you can help the Junction project to grow up. If you know JavaScript, then all the good things you've been hearing about Rails is now becoming available to you through the Junction project. Except, you don't need to learn yet another programming language. With Junction, you still need to know HTML/DHTML, DOM, CSS, and SQL. You still need to know about HTTP, cookies, and sessions. Junction doesn't hide these things from you and magically turn your web browser into the next Visual Basic IDE. Junction believes in fealty to web standards. But, you will probably need to learn about offline, occasionally connected databases and application design. Junction deviates from its Rails roots in pushing on this feature area. Think synchronization and poor (really destitute) man's Notes or Groove. Junction aims to provide a web-standards-based reincarnation of Notes or Groove. This is the key new area that Junction explores and aspires to push forward. Junction, like Rails, also stays out of your way. If you need to specify HTML down to the Nth degree, you can. If you want to bring in more web GUI widgets (like from Dojo Toolkit or htmlArea or Flash or Prototype), you can. Junction is a web Model-View-Controller (MVC) framework, not about hiding JavaScript or the DOM model. Model - View - ControllerHere's how the web MVC paradigm appears in Junction.
BlogPost = function() {}
modelInit('BlogPost');
BlogPost.hasMany('Comments);
BlogPost.findByShortName = function(shortName) {
return BlogPost.find("first", { conditions: ["BlogPost.shortName = ?", shortName] });
}
<div>
Comments...
<ul>
{for comment in blogPost.getComments()}
<li><span>${comment.author} says...</span>
<div>${comment.body}</div></li>
{/for}
</ul>
</div>
<div>
Comments...
<ul>
<% for (var comments = blogPost.getComments(),
i = 0; i < comments.length; i++) { %>
<li><span><%= comments[i].author %> says...</span>
<div><%= comments[i].body %></div></li>
<% } %>
</ul>
</div>
BlogPostController = function() {}
scaffold(BlogPostController, 'BlogPost')It's all hooked together through convention, not configuration. That is, if you just follow the naming conventions, there are no configuration files. The Junction framework favors reflection and late-bound dynamic object decorations and extensions. The result is less code, no recompilation steps, and faster development. Links
{ Junction home | documentation | download } |
bagasdfsdf
wqwqw
Ceci n'est pas un comment.
ㅣㅓㅣ
It would be nice to have some docs about deployment and performance.
Some more docs, convering a little about deployment, are available at http://trimpath.googlecode.com/svn/trunk/junction_docs/files/junction_doc_run-txt.html and http://trimpath.googlecode.com/svn/trunk/junction_docs/files/junction_doc_run_server-txt.html
As for performance docs, one day!
Awesome...thanks for the continued development of trimpath.
Awesome...thanks for the continued development of trimpath.
Awesome, thanks for the continued development of trimpath.
great job!
Is it possible to use just the browser part of the framework without the helma (or any other) webserver? If yes, how should the various files be organized?
Thanks for any pointers.
soso lala
WOW, this is such a great work!
TrimJunction looks great. There's a very simple alternative called jMVC at http://blog.codeville.net/2007/10/04/rich-javascript-mvc-user-interfaces-with-jmvc/
TrimJunction is much more sophisticated but jMVC may be easier in simple cases.
Update: if you're using ASP.NET, check out how easily you can use client-side MVC with jMVC.NET. http://blog.codeville.net/2007/10/18/jmvcnet-neat-client-side-mvc-for-aspnet/