RooJSolutions http://roojs.com/index.php/View.html en http://roojs.com/Roojscom/templates/images/roojs_square_logo_150.png RSS: RooJSolutions - /index.php 150 150 Big step forward in Modular Database Applications with DataObjects 2010-09-01 00:00:00 http://roojs.com/index.php/View/218/Big_step_forward_in_Modular_Database_Applications_with_DataObjects.html <a href="http://roojs.com/index.php/View.html">Article originally from rooJSolutions blog</a><br/> <div>Being a Software Developer is all about developing applications faster, and delivering quicker. At the same time ensuring that quality is not lost and readibility is kept. <a href="http://pear.php.net/package/DB_DataObject">DB_DataObjects</a> is one of the key tools in my productivity toolkit. It was originally designed as a way of ensuring that shared database related code ends up in the right place, In the Model layer of the application, rather than the View or Controller (or worse mixed in to some hybrid PHP HTML garbage..), along with doing cool stuff like Query building etc.</div><div><br></div><div>Over the years, of using DataObjects, I've built up quite a library of reusable DataObjects, which to some degree can be plugged in to any project. A <a href="http://git.roojs.org/?p=Pman.Core;a=blob;f=DataObjects/Person.php">Person</a> object that handles login/authentication and authorization (working with the Permissions and Group objects). A Image object that handles storage of Images, and Files that can provide File type conversion for rendering (using things like unoconv, etc.)</div><div><br></div><div>More recently, I've been using the <a href="http://www.roojs.org/index.php/projects/javascript.html">Roo Javascript library</a> as the UI component, the <a href="http://git.roojs.org">Pman</a> Components ontop of the very lightweight <a href="http://git.roojs.org/?p=pear;a=blob;f=HTML/FlexyFramework.php">HTML_FlexyFramework</a>. The result is a very modular set of Application development parts. That can quickly be thrown together to build applications. Here's how they all fit together and how it just got a whole lot more modular and flexible...</div><div><br></div><div><br></div> When unstable is just not unstable enough 2010-08-29 00:00:00 http://roojs.com/index.php/View/217/When_unstable_is_just_not_unstable_enough.html <a href="http://roojs.com/index.php/View.html">Article originally from rooJSolutions blog</a><br/> <div>..It all started by having yet another look at the gir problem..... Keeping them up-to-date, and trying out the latest cool Gnome toys.</div><div><br></div> Company rename and RooJS sites now online 2010-08-25 00:00:00 http://roojs.com/index.php/View/216/Company_rename_and_RooJS_sites_now_online.html <a href="http://roojs.com/index.php/View.html">Article originally from rooJSolutions blog</a><br/> After what seems like forever in design and migration, I've turned on the roojs.com and roojs.org domains, I'm slowly in the process phasing out my old company name - AK BK Consulting, which is now rooJSolutions<div><br></div><div>Quite a few of the key pages are missing content at present, but the blog and it's features are mostly moved over.</div><div><br></div><div>After I fill out all the missing content, I'll get back to blogging about how most of the Javascript tools and associated backend libraries all work together. Exciting times for a quality platform neutral Javascript Rich User Interface,&nbsp;guaranteed&nbsp;$(wtf) free...<br><div><br></div><div><br></div></div> Javascript Packer 2010-08-11 00:00:00 http://roojs.com/index.php/View/194/Javascript_Packer.html <a href="http://roojs.com/index.php/View.html">Article originally from rooJSolutions blog</a><br/> Javascript packer in Javascript, with full scoped variable replacement <h3>Source:</h3> <pre>git clone http://git.roojs.org/gnome.introspection-doc-generator<br><br><a href="http://git.roojs.org/?p=gnome.introspection-doc-generator;a=tree">http://git.roojs.org/?p=gnome.introspection-doc-generator;a=tree</a></pre><br><br><br> app.Builder.js - First release 2010-07-05 00:00:00 http://roojs.com/index.php/View/192/appBuilderjs__First_release.html <a href="http://roojs.com/index.php/View.html">Article originally from rooJSolutions blog</a><br/> <h3>A Release!!! - Well Idle hands make cool stuff...</h3> <object width="560" height="425"><param name="movie" value="http://www.youtube.com/v/0qJrE2za47U&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;border=1"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/0qJrE2za47U&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="425"></object> <br><h3>What is It?</h3>Basically Glade on steriods. (and it needs a good name!!)<br><h3>What?</h3>Well Glade the UI builder is great for what it does, however app.Builder.js attempts to solve a few roadblocks in Glade<br><br><ul><li>Moving stuff around is klumsy - no drag drop - It's not very good for prototyping layouts...</li><li>It's limited in what widgets can be added</li><li>Coding (when used as an Ajunta addon) is just downright messy.</li><li>It's difficult to extend/modify (and in some cases next to impossible)</li><li>Adding additional properties to widgets is difficult</li><li>Information is often hidden from display (how many clicks to find out what signals are connected)</li><li>There is no 'run it and see' option.</li></ul><h3>So what makes this different..?</h3><ul><li>It's all done in Javascript - using a tree like structure (and it's fully self hosting) - the application is used to modify it'self.</li><li>It uses GObject Introspection. which solves a number of issues</li><ul><li>All available properties can be set (and quickly listed, with documentation)</li><li>how widget's can be packed, can be determined from introspection of the methods.</li><li>all signals are available, and stubs are created for you to start implementing.</li></ul><li>Making extra widgets to the application is just a matter of editing files (eventually a UI will enable you to pick from a list of available Introspection elements... )</li><li>You can build web Applications (using toolkits like RooJS) - ExtJS, Moo etc. could be easily added..</li><li>It should be quite easy to build Clutter applications...</li></ul><h3>Do I need to know anything to use it.</h3>Yes, one of the core concepts behind the builder is understanding XObject, a simple Javascript wrapper around GObjects<br>that enables you to create a JSON like tree, and XObject will turn your tree into an application.<br><br>Key features of the XObject are<br><ul><li>xtype - the name of the GObject (eg. Gtk.Window)</li><li>packing - the pack property, can be a string (comma seperated indicating how an element is packed to it's parent)</li><li>id - all objects can have ID's you can fetch any object using this.get('the_id') as long as it's a child of the current element. To look up the tree, use a '.' at the start, or to start at the top of the tree use '/', eg. this.get('/Window') get's you the window. this.get('/Window.toolbar') get's you the first toolbar in the window.</li><li>el - when an element is created, the GObject is always stored in this.el</li><li>|pipe - properties - currently the editor uses '|' as a prefix to indicate the value is raw Javascript (eg. a function or Value, that when used should not be quoted as if it was a string.</li></ul><h3>What state is it in?</h3>Well, It's self editing.. - The application is used to create it's self, just create a new Gtk Project, and point it at the Sample directory, and you can edit the current codebase. (copying it to the Builder directory when you have a stable build)<br><h3>What's to do...</h3>Quite a few tweaks.. It works, but could do with more time in polishing the interface. My personal goal is to save time using it as a productivity tool, for development. Which is basically where it's at..<br><h3>Where do I get it?</h3>Download a tarball <a href="http://devel.akbkhome.com/app.Builder.js.2010-05-25.tgz">app.Builder.js.2010-05-25.tgz</a><div> or </div> <div>git clone http://git.akbkhome.com/app.Builder.js<br><br></div><div>once unpacked/cloned.</div><div>run install_gir.sh - to update your gir files.</div><div>If you want to try RooJS editor - you need git then</div><div>run update.sh</div><div><div><br></div><div><h3>What do I need to get it to work?</h3></div><div>basically a working gobject instrospection installation (.gir files and .typelib files) and the latest version of the Gnome seed interpreter</div><div>- I know it works on Linux. I would be interested to hear if it works on other platforms.</div><div>Note: there is a update script in the distribution which fixes the currently available Gtk gir's (please read the readme.txt for more info)</div><div><br></div><div><br></div> </div> Using WebKit Inspector with seed 2010-06-11 14:32:09 http://roojs.com/index.php/View/193/Using_WebKit_Inspector_with_seed.html <a href="http://roojs.com/index.php/View.html">Article originally from rooJSolutions blog</a><br/> One of the key reasons to create the app.Builder, was so I could speed up the development of Web applications using the Roo library. The web based version saved considerable time, and led to quite an improvement in delivery times for projects. <div><br /></div><div>It's key drawback was the very limited editing enviroment offered by web based textarea, the slight latency and klunky file writing method. However the ability to use Firebug or Webkit inspector was very usefull in debugging in-development applications.</div><div><br /></div><div>As I eat my own dogfood by developing with the desktop version, most of the previous issues with the development platform had been solved, however debugging was very difficult - I effectively had to run the application in a browser to get debugging information. So after a day of fustration with that, I decided to investigate the Webkit API a bit further, and to my delight discovered that the Inspector you see in Chromium / Chrome is just a few lines of code away.</div><div align="baseline"><br /></div><div><img src="http://devel.akbkhome.com/webkit_inspector.jpg" /></div><div><br /></div><div>As you can see above, I can fully debug the application as it's being modified.</div><div><br /></div><div>The basic code to do this was quite simple. It needs a couple of fixes to the WebKit Gir file, (which has been submitted as a bug report to Webkit), but this simple bit of code should illustrate how to use it in seed.</div><div><br /></div><pre>//&lt;Script type=&quot;text/javascript&quot;&gt; /** * Test of web kit inspector. * create a window + 2 webviews. inside scrolled window. * load google in first, then hook in the inspector.. * * needs the transfer ownship fixing on return value in WebKit-1.0.gir * * &lt;method name=&quot;get_inspector&quot; * c:identifier=&quot;webkit_web_view_get_inspector&quot;&gt; * &lt;return-value transfer-ownership=&quot;none&quot;&gt; * &lt;type name=&quot;WebInspector&quot; c:type=&quot;WebKitWebInspector*&quot;/&gt; * &lt;/return-value&gt; * &lt;/method&gt; * * then compile it.. * g-ir-compiler /usr/share/gir-1.0/WebKit-1.0.gir -o /usr/lib/girepository-1.0/WebKit-1.0.typelib * */ Gtk = imports.gi.Gtk; WebKit = imports.gi.WebKit; Gtk.init(null,null); // build the UI.. w = new Gtk.Window.c_new( Gtk.WindowType.TOPLEVEL); v = new Gtk.VBox(); s1 = new Gtk.ScrolledWindow(); s2 = new Gtk.ScrolledWindow(); w1 = new WebKit.WebView(); w2 = new WebKit.WebView(); s1.add(w1); s2.add(w2); v.add(s1); v.add(s2); w.add(v); // enable inspector.. w1.get_settings().enable_developer_extras = true; // load google on show.. w1.signal.show.connect(function() { w1.load_uri(&quot;http://www.google.com&quot;); }); // load the inspector when loading has finished! w1.signal.load_finished.connect(function(wv) { w1.get_inspector().show(); }); // return the bottom window as the inspector.. w1.get_inspector().signal.inspect_web_view.connect(function() { return w2; }) // show and go.. w.show_all(); Gtk.main(); </pre> Application Builder slowly growing 2010-05-14 11:16:00 http://roojs.com/index.php/View/191/Application_Builder_slowly_growing.html <a href="http://roojs.com/index.php/View.html">Article originally from rooJSolutions blog</a><br/> <p> </p><p>While paid work is still horribly quiet, my little application builder is getting closer to usable.</p><p>I posted a video a while back showing the web version of the Application builder, this is the next generation, a desktop version all done in Javascript using Seed. Not only can it build Roo applications, but also Gtk ones.. (and in theory maybe JQuery/Prototype etc..)</p><p>The main reason to switch to a desktop version was the addition of GtkSourceView, which will enable autocompletion and proper code editing.</p><p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/02kBLEbarC4&hl=en_US&fs=1&" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed src="http://www.youtube.com/v/02kBLEbarC4&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385" /></object> </p><p>It's really a proof of concept, but I can easily move it out to github from it's current home - <a href="http://git.akbkhome.com/?p=app.Builder.js">http://git.akbkhome.com/?p=app.Builder.js</a> if anyone want's to help out.</p><p>download:</p><p>git clone http://git.akbkhome.com/app.Builder.js</p><p>run update.sh once download to get the roo library</p><p><br /></p><p> </p> Git Live 2010-05-11 00:00:00 http://roojs.com/index.php/View/190/Git_Live_.html <a href="http://roojs.com/index.php/View.html">Article originally from rooJSolutions blog</a><br/> <p> </p><p>Inotify and Git auto commit then push using Gnome Seed</p>