April 27, 2012

[Video] Servoy vs MeteorJS Comments (2)

In the past week, MeteorJS has generated a lot of buzz in the internetz. And for good reason: developing javascript applications is currently a painful process of determining what libraries and projects to use, getting them all to work together, working out debugging strategies, setting up code sharing with multiple developers, and finally building and deploying. 

All of which has very little to do with actually writing your web application!

The holy grail of web application development is starting from a point where all the brute grunt work is already done for you so you can focus on just writing and deploying an application. Meteor makes a compelling case that they have figured this out.

Of course Servoy has been doing this for years. So I sat down today and replicated the Meteor demo video with Servoy. Many similarities and some slight differences which I discuss as I go through the same steps they do to build and deploy a complete application.

You can find the Meteor screencast I referenced here: http://www.meteor.com/screencast

To check Servoy out further, head on over to: http://www.servoy.com

| Posted by David Workman on April 27, 2012 at 07:27 PM in Video | Permalink | Comments (2)

March 08, 2012

[Article] Module best practices Comments (0)

It's been six and seven years respectively since myself and Bob have posted on the subject of Servoy modules.

Since then, here at Data Mosaic we've written an entire application frameworks, released an open source CMS, integrated diverse technologies with Servoy—and applied all this many times over on various client projects.

This has taught us a lot about how to write, deploy and keep updated in many places—developer machines and deployment servers—reusable code in large solutions.

We've just completed an article on module best practices for the Sutra CMS documentation as understanding Servoy modules is important for including the Sutra CMS modules in your own solutions.

In it we cover basic module concepts, various techniques for extending functionality contained in modules, and how to make this all work smoothly with SVN.

Whether you are developing a small solution by yourself or part of a team of developers working on projects for many clients, I hope you will find something useful to help improve your development workflows.

The article is located here.

| Posted by David Workman on March 8, 2012 at 02:24 PM in Articles | Permalink | Comments (0)

January 24, 2012

[Video] Coding Session #14: Object Oriented Programming Comments (0)

If you order 46 pairs of shoes, 23 bags, 15 balls, and one commemorative bowling pin—how many boxes does it take to ship your order and how much does it all weigh?

Sounds like some messed up test question your insane teacher threw on an Algebra I test just to see how many kids would cry. I remember thinking in school, "Who the f' cares when the stupid train arrives in the next town?!"

I still have my doubts about trains but in this coding session I find out first hand that Post Offices do care about boxes and how much they weigh.

How would you solve this shipping problem in code?

Object oriented programming to the rescue. And a good debugger. And a buddy looking over your shoulder and catching your mistakes.

 

| Posted by David Workman on January 24, 2012 at 11:06 AM in Video | Permalink | Comments (0)

January 17, 2012

[Video] Coding Session #13: AJAX with Servoy Comments (1)

For this coding session we have a very special guest: Patrick Talbot from ServoyForge. Since he and I had scheduled this session in, we also invited a number of other programmers from around the interwebz to hang out with us. The end result is a dynamic exchange of ideas that ranged far from the original intent of the session!

Ostensibly, this session is about how to do an AJAX call with Servoy. It covers the full round trip of sending and receiving data, executing code on both the client and server side, and debugging tools and strategies to easily see how everything works.

This is for a website that Patrick is doing with the Sutra CMS platform. Very nice design. The AJAX call is needed for implementing dynamic searching.

Video Part 1: This is where I set up my development environment with Patrick's website. You'll see me go through setting up another Servoy developer in one Servoy install, setup database connections and transfer data, and hook into a shared SVN. Helpful if you are a Servoy developer with the need to work on multiple projects and very helpful is you are looking to get into Sutra CMS development.

Since this all takes time and is rather boring, Patrick happily regales us with his knowledge of the upcoming Servoy 6.1 and integration with ServoyForge and answers various other questions the crew throws at him.

http://www.youtube.com/datamosaic#p/u/1/2SB7f_hpEFU

Video Part 2: We hit AJAX right out the gate here. Get it all working, then do the SVN thing and make sure it all works on Patrick's machine. Once you see how we put it all together, I think you will agree that not only is AJAX a powerful technique to have in your bag of tricks—it is easy to do.

In part one Patrick let slip an unannounced special project he was working on for Servoy developers. Somehow we managed to get him to do a full demo of it after we were done with the coding thing. How about a modeling tool that hooks right into your Servoy database/table and relations files?

That's right. And you heard it here first: Servoy Modeler by Patrick Talbot.

http://www.youtube.com/datamosaic#p/u/0/7wUo-wnmw6M

Many thanks Patrick! And also Troy, Lach and Rob for helping make this one fun coding session.

 

| Posted by David Workman on January 17, 2012 at 04:06 PM in Video | Permalink | Comments (1)

December 23, 2011

[Commentary] Does being tired make us better coders? Comments (2)

I did a team programming session the other day that started late with my brain already fried. My cohort wasn't in much better shape either but we felt we needed to at least grind something out.

At one point I got really annoyed because my tired brain was stumbling over finding and implementing an API call. And not someone else's API call—one of our own creations. Creations that we expect other people to use as they are in a released product.

If I'm having a hard time, how the hell is anyone else going to figure it out?!? Grrr....

Piling a stupid moment on top of tired and cranky is one way to critique your own code. In my frustration I wrote a bunch of un-PC comments about how we weren't paying attention to details and documentation and whatnot—at the top of our next day's todo list. Highlighted in red to make sure everyone started their day with what I deemed in the moment was the correct sense of urgency.

Fast forward to the next day. My brain has had some time to get over frustration and start working on some solutions. This leads to an all-day session of team coding that results in a reorganized API that is much cleaner and Troy figuring out a neat trick for getting Servoy's code completion to work with functions attached to our own objects. A very productive day.

As we're winding things down I quip in our all-hands meeting, "Hey, maybe brain-dead programming has some benefits after all." My way of apologizing for yelling on the master todo list. Because, you know, I've never gone through the 12-step program for apologizing correctly.

To which one of the team links us to this:

Why programmers work at night

A very interesting read. One of the author's premises is: "Because being tired makes us better coders".

I'm not sure I agree with that part entirely but I will say that being tired is one hell of an honest way to look at your own code.

| Posted by David Workman on December 23, 2011 at 07:26 PM in Commentary | Permalink | Comments (2)

November 21, 2011

[Video] Coding Session #12: Reusable Workflow Considerations Comments (0)

In a previous coding session we've talked about what makes effective reusable code. In this coding session, we're going to take the same concept and apply it to workflows.

For a list of principles, I think the list from our reusable code session still applies:

Continue reading "[Video] Coding Session #12: Reusable Workflow Considerations"

| Posted by David Workman on November 21, 2011 at 11:33 PM in Video | Permalink | Comments (0)

November 19, 2011

[Tip] Connect Servoy to MongoDB Comments (2)

We changed the data structure in the upcoming release of Sutra CMS to key/value pairs for a number of tables. Our aim was to nip runaway table creation in the bud (like what happens in Concrete5 for every new block you install) and potentially add the ability to use a NoSQL data storage for scaling. Sutra CMS is multi-tenant and multi-site and with clustered Servoy servers the RDBMS could conceivably be a limiting factor.

I finally sat down this evening to see if I could get Servoy and MongoDB to talk to each other. Turns out it is stupid easy. 

MongoDB download and installation instructions:
http://www.mongodb.org/display/DOCS/Quickstart

Download and put the mongo java driver into Servoy's plugin directory:
https://github.com/mongodb/mongo-java-driver/downloads

Furthermore, MongoDB's data format (BSON) and easy syntax is second nature to a Servoy javascript programmer. It almost has me thinking it might almost be easier to use MongoDB instead of an RDBMS for certain types of programming like meta data driven frameworks, solution model structures, configurations, etc.

I've gone ahead and pasted my inline notes along with the code as I have a couple of outstanding questions to still check on. I want to give the mongodb-rhino jars a testing for the automatic to/from javascript native object conversion and I suspect running all code through the headless client plugin is the proper approach. If you have any ideas, comments appreciated!

 Servoy javascript code to test with:

 

| Posted by David Workman on November 19, 2011 at 02:30 AM in Tips | Permalink | Comments (2)

November 14, 2011

[Video] Coding Session #11: Sutra CMS Page Action Comments (0)

In this coding session we write a server-side method that collates data from different sources into one field. This field is used for the generic search routine on a product oriented website. This method gets included into the Sutra CMS as a custom "page action". Page actions is the Sutra CMS hook to extend core functionality in the CMS by block type.

Coding-wise the big challenge is to track down data through complex chains of relationships. Having a good ER diagram at hand turns out to be key for completing this session.

In eight parts: 

Part 1: http://www.youtube.com/datamosaic#p/u/7/jkQi252RN2c
Part 2: http://www.youtube.com/datamosaic#p/u/6/q7_S6JWrkCg
Part 3: http://www.youtube.com/datamosaic#p/u/5/rHQImi1lxzo
Part 4: http://www.youtube.com/datamosaic#p/u/4/a1M2ygkNDxA
Part 5: http://www.youtube.com/datamosaic#p/u/3/ZPDTjRcs_EM
Part 6: http://www.youtube.com/datamosaic#p/u/2/4Ebe4qEaxmQ
Part 7: http://www.youtube.com/datamosaic#p/u/1/Q6Edh0KgwbA
Part 8: http://www.youtube.com/datamosaic#p/u/0/FQhuYE7GZZw 

| Posted by David Workman on November 14, 2011 at 09:50 AM in Video | Permalink | Comments (0)

November 08, 2011

[Video] Coding Session #10: Multi Project Setup Comments (0)

Over the years we've built up quite an amount of code that we share between projects. Data Sutra as our application deployment platform and core reusable functions; Sutra CMS as our website platform; various business workflow modules such as blast emailing, CRM, inventory, documents, projects, etc.

As we're coding the custom portions of a particular project, we also want the ability to modify the reusable modules and then share those changes to all of our other ongoing projects.

In this coding session, Troy and I setup a new project. We cover:

1 setting up multiple Servoy Developer instances
2 resolving Servoy problem view items
3 strategy for sharing servoy resources
4 setup for reusable modules
5 SVN compartmentalization

These are concepts that we have developed over a long period of time to manage the complex interactions arising from having to manage shared and custom code bases between multiple developers and projects.

In three parts:

Part 1: http://www.youtube.com/datamosaic#p/u/2/qPZfDfI74SU
Part 2: http://www.youtube.com/datamosaic#p/u/1/8JYZwznhI0o 
Part 3: http://www.youtube.com/datamosaic#p/u/0/Ka0p-Bi8nKo

 

| Posted by David Workman on November 8, 2011 at 06:53 PM in Video | Permalink | Comments (0)

October 27, 2011

[Video] Coding Session #9: Sutra CMS Server-side Programming Comments (0)

We're in the advanced stages of a website build with this coding session. Not only is there lot's of Servoy code going on but you get an idea of how we team program, manage multiple development machines with SVN and how we run testing and track down new bugs with Sutra CMS.

Even though the task is website and Sutra CMS based, this video is useful for Servoy coders of all types because of the heavy emphasis on coding.

In seven parts:

Part 1: http://www.youtube.com/datamosaic#p/u/6/IxvfLUiqQDE
Part 2: http://www.youtube.com/datamosaic#p/u/5/18ahwIFXM40
Part 3: http://www.youtube.com/datamosaic#p/u/4/XhLuC1T-eVY
Part 4: http://www.youtube.com/datamosaic#p/u/3/oFUIlAXFwqo
Part 5: http://www.youtube.com/datamosaic#p/u/2/eY2YLipAsUQ
Part 6: http://www.youtube.com/datamosaic#p/u/1/r7JvnshpeRg
Part 7: http://www.youtube.com/datamosaic#p/u/0/2FJ3U6huiBo 

| Posted by David Workman on October 27, 2011 at 04:47 PM in Video | Permalink | Comments (0)