Springone 08 Presentation
June 16th, 2008
Last week I had the privledge of presenting a session at The Springone 08 Conference in Antwerp, Belgium. Here is the slide deck for the presentation.
Technorati Profile tags: ria appcelerator soa architecture springone08
Death of Functional Requirements: UPA presentation
June 4th, 2008
This evening I will present a session to The Usability Professionals Association. Here is the slide deck for the presentation.
Technorati Profile tags: ria appcelerator soa architecture upa
University of GA Terry College Presentation
April 9th, 2008
This evening I was privileged to present a 2 hour session on architecture to a UGA Terry College of business master’s Systems and Analysis Design class taught by Jeff Howells. Here is the slide deck from the presentation.
Technorati Profile tags: ria appcelerator soa architecture ugaterrycollege
Implementing an Appcelerator Plugin
March 4th, 2008
Purpose
The Appcelerator framework allows for the extension of the build and deployment process so that you can add components and modify the behavior of your service implementations. It is quite powerful and not only restricted to services, plugins for example could span across to the modification of applications and the entire build and deployment process for that matter. For simplicity, this article will identify how to create a new component added to our java service for monitoring performance.Install Appcelerator
I’ve assumed that you’ve successfully downloaded and installed Appcelerator from http://www.appcelerator.org/products. Once you’ve gone through the installer you can get the java service
app install:service java
You may want to get an existing plugin (I needed the java:spring plugin to implement my plugin):
app install:plugin java:spring
Plugin Creation
Lets assume that our plugin is going to be called java:perf, to create the plugin project:
cd $HOME/workspace
app create:plugin . java:perf
This will create a sub directory named java_perf, now you will want to create a proper license entry in your build.yml for example check out build.yml. You now have the opportunity to modify the entry points in your java_perf.rb. I personally wanted to setup my install script so that:
- dynamically builds the jar when we add the plugin to a project
- modified the spring.xml to include the bean entries for my component
rake zip
Install the plugin
As you noticed, I haven’t covered debugging the plugin just yet, this is because i want to first set up the plugin for installation and then work with it in my install directory. Lets install it to my local machine:
app install:plugin java_perf.zip
Add the plugin to my project
I thought that I’d create a blank java project real quick
cd workspace
app create:project . myproject java
now we can add the spring plugin and our new java:perf plugin to our project
cd myproject
app add:plugin java:spring
app add:plugin java:perf
You can now directly modify the java_perf.rb file in your install directory
- windows: c:/Program Files/Appcelerator/releases/plugin/java_perf/1.0
- unix: /usr/local/Appcelerator/releases/plugin/java_perf/1.0
- mac os: /Library/Appcelerator/releases/plugin/java_perf/1.0
Next Steps
As a final parting you can release your new plugin so that others may be able to leverage it
cd $HOME/workspace/java_perf
app release java_perf.zip
-andrew
this article is cross posted at: http://www.appcelerant.com/implementing-an-appcelerator-plugin.html
Appcelerator Launches Developer Network
March 3rd, 2008
New Site
Well after over 2 months of perfecting the message, Appcelerator announced the launching of their new developer network. What i really like about this is that they are eating their own dog food. Its slick stuff like this that makes me proud to be a part of the company. If you are thinking of using appcelerator or just want to see how to make a huge splash in the development community check out the site:http://www.appcelerator.org
cheers
Technorati Profile tags: ria appcelerator soa
Effectively Implementing Appcelerator RIAs and Services
February 26th, 2008
Purpose
If you are venturing to implement a Rich Internet Application (RIA) with Appcelerator, then there are features about the framework that I’m really geared up about that help you implement your solution effectively. When used together these items enable the agile creation of solutions in a shorter time that integrate nicely with services in an existing architecture and provide a richer user experience for clients.Achieving Re-use
There are a bunch of ways to do this, personally I leverage app:content files judiciously. You can provide args in the definition of your content files so that you can use the same content file over again. Some things to keep in mind:- reference the args as #{argname} in your element ids, any variables, and make sure that functions you call take this into account (possibly make them stateless)
- the order in which the content file is loaded to make sure that listeners are properly setup to respond to messages
<app:content lazy="false" on="mainstate[person] then show else hide"
args="{'prefix':'person'}">
</app:content>
here is the content.html file
<div id="#{prefix}header" ...
</div>
I know that this may be abstract, but the point is that you can use the arg “prefix” to reuse the file and provide alternative behavior based on it.
Mocking Services
You can mock out server side services extremely easily with the framework. This is extremely useful whether your goal is:- Visual Use Cases: implementing a prototype that results in 100% useable application code
- Working offline: no need to run a web server at all, you can directly run off of a simple file
No restart
If you are just working on your application (no service work), you can directly make changes to your application without requiring rebuilding and redeploying your application. In java I typically work directly in my tomcat deploy directory and have an ant task to pull the web files into my workspace. With our next version of the framework coming out, this will be even easier with our support for Jetty coming and the Ruby based command line tool. In the meantime, the following is useful in your java project:
ant pullweb
Make sure that you have your deploy.dir setup in your $HOME/.ant.properties for example:
deploy.dir=/Applications/apache-tomcat-6.0.14/webapps
With our Ruby implementation for example, this is even easier (running webbrick directly in your workspace).
Great Support for Model Objects
I’ve touched a bit on this in a previous post on JSON serialization with Appcelerator java services. To summarize the framework enables- Hibernate persistence: ModelObjects can easily be used with our Hibernate integration
- JSON serialization: Serializing and deserialing complex objects is a snap
Slick support for forms
In case you haven’t looked, you dont need to include a form tag anywhere in the application: simply add a fieldset attribute to your input elements and put something like this
<input name="age" fieldset="save_person" type="text"/>
<input name="name" fieldset="save_person" type="text"/>
<input value="Create Person" fieldset="save_person"/>
on="click then r:create.person.request" type="button"/>
This will create a message of type r:create.person.request with the payload being all your input elements with fieldset of “save_person” ex:
{'name':'jim','age':'35'}
To me, this is very eloquent solution to leveraging form input elements with a messaging architecture.
Easy to use UI widgets
I love some of the widgets that are at your fingertips. Some of the ones that i use the most- app:panel: slick styling
- app:datatable: great way to show rows of data
- app:chart: fantastic visual effects to bring life to data
Service Platform Options
Pitching the right framework is something that varies from project to project. For example, possibly your client wants to leverage an existing java infrastructure and is sold on its robustness for scaling enterprise applications, while on the other side possibly you want to take advantage of using a Rails controller and ORM/Active Record implementation for rapid development. On the same level you also have the option for implementing services to customers that deliver in a .Net solution architecture. Many other platforms also exist (python, PHP) enabling the opportunity to plug into those services as well.The app:get non-visual widget also makes pre-existing services accessible as well and since Messaging is at the heart of the implementation, plugging into an ESB or pure MOM framework is perfectly setup as well.
Wrap Up
In this article 7 key tips have been covered- re-use
- mock services
- no restart
- model objects
- messaging & forms
- UI widgets
- platform options
-andrew
This article cross posted at http://www.appcelerant.com/effectively-implementing-appcelerator-rias-and-services.html
Technorati Profile tags: ria appcelerator soa
Last Lecture: Randy Pausch
February 24th, 2008
Short snippet
Recently several people have asked me if i’ve seen Randy Pausch’s final lecture. its an extremely touching piece and i thought that i’d share it with anyone who hasn’t had the opportunity to catch it. its 70 minutes off of his site and was so popular that oprah did a piece where he gave a 10 minute version of it. Please go check it out:http://www.youtube.com/watch?v=ji5_MqicxSo
Technorati Profile tags: randypausch cmu
C and H beer of the Month club
February 21st, 2008
a kickin gift
this year i received a subscription to c & h beer of the month club. this was probably one of the most excellent gifts i’ve received in quite some time. the low down:- 12 bottles every month from 2-3 breweries (each brewery provides 3 bottles of a given type of beer)
- unique beers that i personally have never tried before
- this month: 2 ales and 2 much larger lagers
casco bay brewing company
this month a brewing company based out of maine provided some nice beers:- winter old port ale
- riptide red ale
both of these beers rock. during the cold months, i’ve really gotten to appreciate the bitter beers with some funky additives (cherry and orange peel). i personally liked the winter port a bit more, but the red ale was pretty nice too.
the harpoon brewery
harpoon is based out of boston, which kind of makes since for the name
i’ve had harpoon before, but not this one. probably my favorite in the stack
santa fe brewing
from new mexico – to be honest i’ve never had a NM beer before
this was the lightest beer in the stack, which as you may have guessed isn’t my favorite in the bunch. it does, however, balance the lot on out.
recommendation
i’d recommend this to anyone out there who is a beer enthusiast. my subscription runs out in march and based on the track record so far, i must say that i will renew then.cheers!
Technorati Profile tags: beer
Debugging Appcelerator Applications
February 20th, 2008
Purpose
The ability to debug applications is critical when things go sideways on you. I understand that for some of the developers out there learning a new framework can be challenging. Appcelerator provides developers with the tool-set to drastically reduce the amount of javascript code that they need to write and to be honest I think that the more you use the framework, the less you will need to debug applications as you familiarize yourself with the syntax.Alerts
Prior to logging, alerts were the best way to display state during execution (showing you how old school I’ve been). Nonetheless, sometimes this is just easier since it blocks execution until you confirm. Sometimes however, you want to display objects. Lets take for example the following
alert(myobject);
You make get an alert that shows:
Well that isn’t very useful. If you want a nice string representation, use the following
alert(Object.toJSON(myobject));
Now you’ll get a nice JSON representation.
Logging
Safari and Firefox both provide you with the ability to view logging in the console. For firefox, you need to install firebug. If you are a safari user, you can use webkit (from the Debug menu, click “Show Javascript Console”). Both of which make available a console that displays log statements. In firefox you can do the following in javascript
console.log("wassup");
I suggest however that you dont do that! Instead make use of the abstracted Logger
Logger.info("wassup");
This will not only show up in Firefox, but also in Safari’s console.
On another note, you can use the debug=1 parameter in your URL and you will see a ton of appcelerator messages (ex: http:localhos:8080/myapp?debug=1). I will caution you that it will almost look like spam given the amount of detail that is logged, but nonetheless its there if you want it.
You can also expand the Get and Post statements in firefox which will let you know what you have sent in your request and the JSON result that was returned from the server.
In-line Debugging
Lets say that you have an error in your app:script. Well in Firefox, you can take a look at the console and that will give you some pretty good feedback, however its going to be some cryptic text and you can’t step through it. You have 2 options that will enable you to step through the code:- can make a call to a javascript function from your app:script (I normally define a project specific javascript file and put my functions in it)
- define a $MQL in your javascript file – app:script goes away
<app:script on="r:someevent.response then execute">
Myapp.dosomething(this.data);
</app:script>
and the corresponding javascript
Myapp = Class.create();
Myapp.dosomething = function(data)
{
//code here
}
For scenario 2: alternatively you could just define in your javascript file
$MQL('r:someevent.response',function(type,msg,datatype,from)
{
//code here
});
The downside of this is that your implementation is not colocated in a single html file, but the upside is that you can debug it. Note that if you are not using content files, then you could alternatively define the above in a script element instead (a little cleaner), however if its a large app, then you really will want to decompose your app and use content files.
IE Specific Debugging
To be honest I’m not a huge IE fan, but it makes up an install base of 80% of the market. Chances are that pretty much everyone out there is using IE if you are building an application that appeals to the general public. To this end, Microsoft has made the .Net Developer Studio available for debugging your applications. The steps are pretty simple:- install .Net Studio and create a project
- add your javascript files to your project
- start IE with your app’s url
- in Visual studio, select debug process and select your iexplorer.exe (sometimes it wont attach, but just keep trying and you should get there eventually)
Firefox (Firebug) Specific debugging
As with IE, you can use the firefox plugin to step through your code.- load your app
- open firebug
- click script and select the html or javascript file and set your breakpoints
Wrap Up
In this article we covered a bunch of ways that you can get down to the details in your application- alerts (and displaying objects as strings)
- logging (appcelerator debug mode, custom log statements, ajax payloads)
- in line javascript debugging and styling
Technorati Profile tags: debugging tags: javascript appcelerator ria ajax
Performance Tuning Appcelerator Applications
February 19th, 2008
Purpose
Once you have developed a functional application and are priming for a roll-out, it will be in your interested to tune your application and identify those touchpoints which are candidates for tuning. I’ve preferred taking a quantitative approach to performance tuning so that you can compare metrics before and afterwards to identify improvement from a measurable perspective. To this end, it is possible to record statistics both client and server side (currently only for java services). Sometimes the culprit may be server side or client side and determining the area where performance bottlenecks exist is important which is why taking on a triangulation approach is important.Client Side
Currently in the client the client, you can invoke the Appcelerator.Util.Performance component. To enable it, simply include logStats=1 in your url, for example: http://localhost:8080/myapp?logStats=1. The performance component by design will have no impact on your application unless you include this parameter. By default, the servicebroker will calculate the statistics for handling all message types both local and remote. The statistics will include the following:- last – the last recorded time
- mean
- hits – aka count
- min
- max
- total – total time overall
Capturing your own statistics
If for some reason you want to capture statistics at a finer level, you can easily to this in javascript:
var stat = Appcelerator.Util.Performance.createStat();
//do some work
Appcelerator.Util.Performance.endStat(stat,"mystat","mycategory");
In this example we create a statistic called “mystat” that will be included in a category of “mycategory”. This is useful for filtering through your stats as well as being able to compare statistics side by side. For example, the service broker will automatically record the following categories:
- remote
- local
Viewing Client Side statistics
You may want to include the following content file in your application and make it visible when the logStats parameter is included.Here is the clientperformance.html source.
Wrap Up
We covered in this article- how you can capture statistics for client side applications
- some performance tips in regards to client applications
this article is cross posted at http://www.appcelerant.com/performance-tuning-appclerator-applications.html
Technorati Profile tags: performance appcelerator javascript ria
quantitative vs qualitative analysis
February 13th, 2008
upon the discussion of bad smells, a mechanism that does not support measurement is useless when calculating improvement. hence the need for statistics arises. to this end i’ve found that the art of decomposing performance is necessarily binded towards a scientific approach. again this is a teaser for a following post…. to come: how to properly tune appcelerator applications and back end services…....
-andrew
movies & comedy: my recent top 5
February 13th, 2008
let me first start off by saying that i have an unique taste, so the mainstream may or may not agree. additionally, i have a certain appreciation for history, so take it for what its worth. lets get down to it
movies
- charlie wilsons war: saw it thrice in the theater and yes philip seymour hoffman tore it up
- departed: i used to hate leanardo di crapio (yes i called him decrapio), he was steller and mat daemon as you can tell knows the southie accent
- apocolypto: granted the mayans didn’t really encounter the conquestadores, but forget the ending, the movie was right on
- the aviator: howard hughes as real as it gets: “wave of the future”
- master and commander: didn’t like it as much the first time as the 2nd or the 22nd: solid
comedy
now for some comedy (putting on the headphones has never made me smile as much @ work)- nick swardson: PARTY.
- sean rouse: HILLARIOUS (even if a little bit risky)
- christopher titus: love the batman
- daniel tosh: love it when the jokes only appeal to 2 out of 100
- david cross: never has someone from atlanta been so foul
gud stufff
Technorati Profile tags: comedy movies
SYMBOLS :=> gud stuff
February 13th, 2008
i was recently presented that symbols are not a “proper” thing to include in blog posts. well, something about running your own blog is that you can say phuck it: symbols rule and i must say that they are == awesomeness. hence for those out there, i can do nothing but recommend them to you, forget google analytics, forget search indexing, consider your blog as an opportunity to put your personal stamp on your site, if you so wish. at the end of the day unless you have a huge audience this is your blog. personally, probably my mother reads my blog and thats it, so might as well write in the language that best suits you, so if that includes all lowercase and symbols, let the shizit fly bud. my props.
Technorati Profile tags: blogging
carnival: rio 08
February 13th, 2008
last week i headed to rio de janeiro with 3 buddies. its been 8 years since i headed down there, and it continues to bring nothing but raves (thats a euphemism btw). i love brazil, there is something about the place that i cant really put into words. when i retire someday, ill move there and grab a penthouse down in ipenima and you’ll never see another blog from me again. :) back in the standard work mode again and that feels good, but not nearly as good as it was down in copacabana.
Technorati Profile tags: rio carnival
socon08
February 13th, 2008
last weekend i headed up to north carolina (or whereever kennesaw state is) to attend socon08. to be honest i headed into socon not really knowing what socon was completely. ended up that it really wasn’t quite as technical as i thought it was. which is….. completely awesome. in addition to technologists, i met quite a few individuals from angel investors to journalists, to real estate practitioners. its fair to say that the event was centered around the domain of social networks.
the attendee list was chuck full of entrepreneurs, and i saw a lot of faces that i recognized from atlanta startupweekend and barcamp atlanta. aside from knowing that i was in good company, an excellent keynote speech was delivered in addition to an interactive speech that turned into an audience discussion. what i liked about this was the following goal which was achieved:- i learned something
- i shared something
- i networked
it was a most excellent conference and i recommend the next version to anyone with marbles to attend socon09.
-andrew
Technorati Profile tags: socon08 socon



