Ramblings

February 4, 2010

Javascript frameworks

Filed under: dev, javascript, mvc — michaelangela @ 6:49 pm

Looking at client side MVC for Javascript. Some that have come up:

Trimpath:

The open source Junction framework is a conventions-over-configuration, synchronizing web MVC framework for JavaScript.

”’TrimPath Junction”’ is a clone or port of the terrific Ruby on Rails web MVC framework into JavaScript.

”’TrimPath Junction”’ is also sometimes referred to as TrimJunction, or as just Junction.

via TrimJunction – trimpath – Project Hosting on Google Code.

Claypool:

Claypool is a small, fast, railable Javascript Application Framework , built on jQuery that provides all the usual important patterns for large, long-lived client-side apps, server-side apps, or something strangely, beautifully in the middle.

via Claypool: A jQuery Web 1.6180339… Application Framework.

Jamal:

Jamal is a set of conventions and small javascript libraries to archieve a complete separation of html, css and javascript in your web application. Jamal is built on  jQuery and inspired by MVC frameworks like  Ruby on Rails,  CakePHP and its derivatives.

So Jamal tries not to stand in your way and helps you to organize your javascript code. Javascript code is likely held in functions and used to end up in spaghetti.

via Jamal.

JavaScriptMVC:

JavaScriptMVC is an open-source framework containing the best ideas in enterprise JavaScript development. It guides you to successfully completed projects by promoting best practices, maintainability, and convention over configuration.

via JavaScriptMVC.

July 14, 2008

A good short-list of PHP frameworks

Filed under: dev, mvc, php — michaelangela @ 7:08 am

I have had to come back to PHP after a long hiatus. I prefer Python but recent projects require PHP and thus my return. I did a project recently with CodeIgniter which really is a spiffy project. But I would like a true OOP PHP5 MVC fast lightweight framework that has user auth, session management and a lightweight ORM. Or be able to plug one in. Perhaps Kohana, based off of CodeIgniter, would fit the bill. Something about “Keep Kohana Alive” makes a little nervous though…

PHP: MVC Based Popular Framworks | Jit V. Tiwari

PHP: MVC Based Popular Framworks

April 17, 2008

Flex, MVC, Cairngorm and Universal Mind Extensions

Filed under: cairngorm, cool, dev, education, flex, mvc, tip — michaelangela @ 8:08 pm

This podcast with Thomas Burleson probably has the best description of MVC with Flex, why to use Cairngorm, challenges of using Cairngorm, why to use the universal mind extensions, the problem of view locators and how to work with those, etc. Good stuff. I wish there was a transcript of this.

UMEvent, UMCommand, Callbacks, and other goodies galore. Cairngorm is really, really good. It’s very lightweight. This just takes it further. Now I just need to understand how to use them. 🙂 But that’ll come later.

Another interesting bit is about the centralized error handling… oh good stuff.

Hmm… webservice is far slower than remote objects. And if they fail,
they can fail silently. Ah, that’s WSDL services. Interesting stuff.

Sequences in Cairngorm is quite different than sequences in UM Cairngorm… wow… nice stuff. It’s giving you quite a bit of flexibility: firing sequence of events and commands.

Another bit about refactoring is mentioned, i.e. every use case in Cairngorm has a command/event. It’s definitely workable but it can get tedious. The UM extensions help with that as well.

Download the file and listen to it with Quicktime Player and bump the speed up to like 175% to save some time. 🙂

The Flex Show: The Flex Show – Episode 41: Universal Mind Cairngorm Extensions w/ Thomas Burleson

April 16, 2008

More on MVC

Filed under: dev, education, flex, mvc — michaelangela @ 4:31 am

Going to have to do some more reading here later… Joes’ article “An architectural blueprint for Flex applications” was probably the first thing I tried to chew through to understand MVC, Cairngorm, and “separating concerns” while building an app in Flex. Model adapters and view mediators look like something I have been wrapping my head around. And so… more reading here later. 🙂

joeberkovitz.com » The MVCS Architecture and ReviewTube Example Application

Use of Model Adapters. Very often, the raw information in a Model is not what a View needs to show, and using Flex data bindings to drive the View from the Model becomes extremely awkward. …snip… In such situations, and even in simpler ones, it’s often better to build a special “model adapter” that both exposes this modified view of the underlying Model, and which also listens to change events from that model, dispatching change events of its own when its “adapted” properties change in response.

Use of View Mediators. Another important pattern not illustrated by ReviewTube is the use of Mediators, in which View/View and Controller/View interactions are handled by separate objects that “decouple” these objects from knowledge of each other. …snip… Another type of example is one in which a View is fairly generic in nature and some intermediate processing of its events is required to figure out how and when to invoke the proper Controller operations based on user interaction with that View.

April 11, 2008

Universal Mind Cairngorm Extensions

Filed under: cairngorm, cool, dev, education, flex, mvc — michaelangela @ 4:18 pm

There are several issues I have had when developing with Cairngorm. It gets better with time as you work around the issues, but you have to “work around them”, as opposed to working within the system constraints. The constraints are good. They give form and function. But there are some headaches… certainly no offense to the Cairngorm developers as it is a phenomenal piece when you think about what went into it.

Well, others agree that there is room for improvement. And this bit from Universal Mind may help with a lot of those things. Good stuff coming.

flexcairngorm – Google Code

Universal Mind has extended the
“classic” Adobe 2.2.x Cairngorm version to provide many productivity
and maintenance enhancements. Those extensions have now been
open-sourced – with BSD licensing – to the Flex and Flash developer
community.

The Cairngorm Extensions are summarized below. Each link will provide details and examples of the specific extension:

  1. Events
    • Built-in support to transport responders for direct view or business logic callbacks.
    • Implementation of AnnounceFaultEvent to allow business logic to centralize error reporting and logging.
    • Implementation of EventGenerator to allow developers to automate dispatching of sequences of events.
    • Events now should self-dispatch… for direct deliver to the business/controller layer.

2) View Notification

  • Built-in framework support to allow views to request direct notifications when buisness events respond.

3) FrontControllers

  • SubControllers are available so modules implemented with
    sub-MVC and dynamically aggregated and used within a global MVC
    framework.
  • Improved error checking
  • Ability to easily register a Function callback for any business event

4) Command Implementation

  • Base class implementation
  • Enhancements to support aggregation of event-business logic within a single Command class.
  • Support for the optional view notifications
  • Best practice to deprecate Command sequencing

5) Delegate Implementation

  • Base class implementation
  • Support for easy queue of delegate calls
  • Improved support for WebService use and WSDL errors
  • Best practice to allow easy data transformations
  • Best practice to hide multiple server calls

6) ServiceLocator

  • Configure services (RDS) at runtime
  • Configure timeouts of HTTPService and WebService

April 4, 2008

Computed properties and binding

Filed under: dev, education, flex, mvc, tip — michaelangela @ 4:46 am

This is also something I’ll have to take a look at later.

Computed properties and binding « FLEXYGEN

Updating views in response to model changes is a snap with Flex data binding.
A model property is set to be [Bindable] and and a view property is set to an expression in curly braces that refers to that property. <snip>

Flex implements this by dispatching a PropertyChangedEvent when “description” changes, but by implementing implicit getter and setter functions, one can customize the event. In the MVC sample I wrote, which I hope to post one of these days, I stumbled upon the following idiom, where several bindable properties are based on a single value changing.

Cairngorm, Flex and MVC

Filed under: cairngorm, dev, education, flex, mvc — michaelangela @ 4:43 am

Cairngorm helps when you’re wanting to know how to structure things. There are other options, especially as you start actually understanding the language. 🙂 PureMVC is an alternate framework. Then Flexygen has a simple MVC sample… without using Cairngorm. It’s not that Cairngorm is bad! It’s the de facto standard framework for Flex (right now at least). But sometimes it feels like you’re fighting it a bit… at least for those who are still learning like me. These are just some things to keep in mind.

Up next is Practical Patterns in Flex which also offers another possibility. I’ll have to look at it in more detail to understand it more though… I’ll save that for another day!

joeberkovitz.com » MAX 2007 in Barcelona: Talk Materials Online

A presentation called Practical Patterns in Flex, which I adapted from Jim Echmalian’s
talk at 360Flex earlier this year. This features a brand new take on
the Model-View-Controller-Service architecture, and highlights the use
of specific design patterns to remedy problems of encapsulating
responsibility, dealing with asynchronous operations, and gaining
access to the “right” controller without using messy singletons. I put
together a working sample application in source code form that accompanies the talk.

Blog at WordPress.com.