<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Evan Summers&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/" />
<modified>2008-04-29T16:36:58Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/evanx/253</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2008, evanx</copyright>
<entry>
<title>Hello World Currencies</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2008/04/hello_world_cur.html" />
<modified>2008-04-29T16:36:58Z</modified>
<issued>2008-04-29T15:25:27Z</issued>
<id>tag:weblogs.java.net,2008:/blog/evanx/253.9634</id>
<created>2008-04-29T15:25:27Z</created>
<summary type="text/plain">So last year i started a &quot;project&quot; to create generally useful reusable cute-and-pasty code, listing the world&apos;s countries, currencies, capitals, timezones et al. This was inspired by another blogger who listed the world&apos;s countries in Java code, and i thought, darn that&apos;s potentially generally quite very frikkin useful!</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
Since i've hardly being doing anything very useful of late, i decided it's time to return to my potentially generally useful efforts of a year ago vis-a-vis "countries of the world" and publish something for a start, to prod myself into "completing" the task, which i was enjoying immensely before it was interrupted by some months of travel.
<p>
So i started preparing Java code which listed the world's countries, currencies, capitals, timezones, internet TLD's, dialing codes, et al, with the help of Wikipedia with its ISO listings. It was helluva interesting, especially the corner cases eg. terrorities which due to current and/or historical political events, are potentially on the borderline of being countries as opposed to um, eg. a defacto self-governing terrority of the secessionist variety, possibly recognised by the UN but not by some country who considers them still part of their territory - you get the picture! 
<p>
Also interesting are various "quirks" eg. the currency for the British Virgin Islands is the US Dollar. Or an island where the southern part is a territory of France and the northern part is a territory of Holland.   
<p>
Having compiled these lists, i should reconcile with <tt>Locale.getAvailableLocales()</tt> via ISO codes, and 
also the timezones of the capitals eg. reconciled with Java timezones via <tt>TimeZone</tt>. Also i need to update the country list eg. Kosovo declared independence, and it's status may have changed according to wikipedia?
<p>
I'll be publishing code on <tt>geo.dev.java.net</tt> under Apache License in due course, so you can cut and paste, slice and dice it!
If you notice anything not quite right as we proceed, please lemme know, and we'll try to keep this thing correcto mundo, going forward.
<p>
Before i get onto the countries, here is teaser sample of the currencies...
<p>
<pre>
putCurrency("AED", 2, "United Arab Emirates dirham");
putCurrency("AFN", 2, "Afghani");
putCurrency("ALL", 2, "Lek");
putCurrency("AMD", 2, "Armenian Dram");
putCurrency("ANG", 2, "Netherlands Antillian Guilder");
putCurrency("AOA", 2, "Kwanza");
putCurrency("ARS", 2, "Argentine Peso");
putCurrency("AUD", 2, "Australian Dollar");
putCurrency("AWG", 2, "Aruban Guilder");
putCurrency("AZN", 2, "Azerbaijanian Manat");
putCurrency("BAM", 2, "Convertible Marks");
putCurrency("BBD", 2, "Barbados Dollar");
putCurrency("BDT", 2, "Bangladeshi Taka");
putCurrency("BGN", 2, "Bulgarian Lev");
putCurrency("BHD", 3, "Bahraini Dinar");
putCurrency("BIF", 0, "Burundian Franc");
putCurrency("BMD", 2, "Bermudian Dollar");
putCurrency("BND", 2, "Brunei Dollar");
putCurrency("BOB", 2, "Boliviano");
putCurrency("BOV", 2, "Bolivian Mvdol (Funds code)");
putCurrency("BRL", 2, "Brazilian Real");
putCurrency("BSD", 2, "Bahamian Dollar");
putCurrency("BTN", 2, "Ngultrum");
putCurrency("BWP", 2, "Pula");
putCurrency("BYR", 0, "Belarussian Ruble");
putCurrency("BZD", 2, "Belize Dollar");
putCurrency("CAD", 2, "Canadian Dollar");
putCurrency("CDF", 2, "Franc Congolais");
putCurrency("CHE", 2, "WIR Euro (complementary currency)");
putCurrency("CHF", 2, "Swiss Franc");
putCurrency("CHW", 2, "WIR Franc (complementary currency)");
putCurrency("CLF", 0, "Unidades de formento (Funds code)");
putCurrency("CLP", 0, "Chilean Peso");
putCurrency("CNY", 2, "Yuan Renminbi");
putCurrency("COP", 2, "Colombian Peso");
putCurrency("COU", 2, "Unidad de Valor Real");
putCurrency("CRC", 2, "Costa Rican Colon");
putCurrency("CUP", 2, "Cuban Peso");
putCurrency("CVE", 2, "Cape Verde Escudo");
putCurrency("CYP", 2, "Cyprus Pound");
putCurrency("CZK", 2, "Czech Koruna");
putCurrency("DJF", 0, "Djibouti Franc");
putCurrency("DKK", 2, "Danish Krone");
putCurrency("DOP", 2, "Dominican Peso");
putCurrency("DZD", 2, "Algerian Dinar");
putCurrency("EEK", 2, "Kroon");
putCurrency("EGP", 2, "Egyptian Pound");
putCurrency("ERN", 2, "Nakfa");
putCurrency("ETB", 2, "Ethiopian Birr");
putCurrency("EUR", 2, "Euro");
putCurrency("FJD", 2, "Fiji Dollar");
putCurrency("FKP", 2, "Falkland Islands Pound");
putCurrency("GBP", 2, "Pound Sterling");
putCurrency("GEL", 2, "Lari");
putCurrency("GHC", 2, "Cedi");
putCurrency("GIP", 2, "Gibraltar pound");
putCurrency("GMD", 2, "Dalasi");
putCurrency("GNF", 0, "Guinea Franc");
putCurrency("GTQ", 2, "Quetzal");
putCurrency("GYD", 2, "Guyana Dollar");
putCurrency("HKD", 2, "Hong Kong Dollar");
putCurrency("HNL", 2, "Lempira");
putCurrency("HRK", 2, "Croatian Kuna");
putCurrency("HTG", 2, "Haiti Gourde");
putCurrency("HUF", 2, "Forint");
putCurrency("IDR", 2, "Rupiah");
putCurrency("ILS", 2, "New Israeli Shekel");
putCurrency("INR", 2, "Indian Rupee");
putCurrency("IQD", 3, "Iraqi Dinar");
putCurrency("IRR", 2, "Iranian Rial");
putCurrency("ISK", 0, "Iceland Krona");
putCurrency("JMD", 2, "Jamaican Dollar");
putCurrency("JOD", 3, "Jordanian Dinar");
putCurrency("JPY", 0, "Japanese yen");
putCurrency("KES", 2, "Kenyan Shilling");
putCurrency("KGS", 2, "Som");
putCurrency("KHR", 2, "Riel");
putCurrency("KMF", 0, "Comoro Franc");
putCurrency("KPW", 2, "North Korean Won");
putCurrency("KRW", 0, "South Korean Won");
putCurrency("KWD", 3, "Kuwaiti Dinar");
putCurrency("KYD", 2, "Cayman Islands Dollar");
putCurrency("KZT", 2, "Tenge");
putCurrency("LAK", 2, "Kip");
putCurrency("LBP", 2, "Lebanese Pound");
putCurrency("LKR", 2, "Sri Lanka Rupee");
putCurrency("LRD", 2, "Liberian Dollar");
putCurrency("LSL", 2, "Loti");
putCurrency("LTL", 2, "Lithuanian Litas");
putCurrency("LVL", 2, "Latvian Lats");
putCurrency("LYD", 3, "Libyan Dinar");
putCurrency("MAD", 2, "Moroccan Dirham");
putCurrency("MDL", 2, "Moldovan Leu");
putCurrency("MGA", 0, "Malagasy Ariary");
putCurrency("MKD", 2, "Denar");
putCurrency("MMK", 2, "Kyat");
putCurrency("MNT", 2, "Tugrik");
putCurrency("MOP", 2, "Pataca");
putCurrency("MRO", 2, "Ouguiya");
putCurrency("MTL", 2, "Maltese Lira");
putCurrency("MUR", 2, "Mauritius Rupee");
putCurrency("MVR", 2, "Rufiyaa");
putCurrency("MWK", 2, "Kwacha");
putCurrency("MXN", 2, "Mexican Peso");
putCurrency("MXV", 2, "Mexican Unidad de Inversion (UDI) (Funds code)");
putCurrency("MYR", 2, "Malaysian Ringgit");
putCurrency("MZN", 2, "Metical");
putCurrency("NAD", 2, "Namibian Dollar");
putCurrency("NGN", 2, "Naira");
putCurrency("NIO", 2, "Cordoba Oro");
putCurrency("NOK", 2, "Norwegian Krone");
putCurrency("NPR", 2, "Nepalese Rupee");
putCurrency("NZD", 2, "New Zealand Dollar");
putCurrency("OMR", 3, "Rial Omani");
putCurrency("PAB", 2, "Balboa");
putCurrency("PEN", 2, "Nuevo Sol");
putCurrency("PGK", 2, "Kina");
putCurrency("PHP", 2, "Philippine Peso");
putCurrency("PKR", 2, "Pakistan Rupee");
putCurrency("PLN", 2, "Zloty");
putCurrency("PYG", 0, "Guarani");
putCurrency("QAR", 2, "Qatari Rial");
putCurrency("ROL", 2, "Romanian Leu");
putCurrency("RON", 2, "Romanian New Leu");
putCurrency("RSD", 2, "Serbian Dinar");
putCurrency("RUB", 2, "Russian Ruble");
putCurrency("RWF", 0, "Rwanda Franc");
putCurrency("SAR", 2, "Saudi Riyal");
putCurrency("SBD", 2, "Solomon Islands Dollar");
putCurrency("SCR", 2, "Seychelles Rupee");
putCurrency("SDD", 2, "Sudanese Dinar");
putCurrency("SDG", 2, "Sudanese Pound");
putCurrency("SEK", 2, "Swedish Krona");
putCurrency("SGD", 2, "Singapore Dollar");
putCurrency("SHP", 2, "Saint Helena Pound");
putCurrency("SKK", 2, "Slovak Koruna");
putCurrency("SLL", 2, "Leone");
putCurrency("SOS", 2, "Somali Shilling");
putCurrency("SRD", 2, "Surinam Dollar");
putCurrency("STD", 2, "Dobra");
putCurrency("SYP", 2, "Syrian Pound");
putCurrency("SZL", 2, "Lilangeni");
putCurrency("THB", 2, "Baht");
putCurrency("TJS", 2, "Somoni");
putCurrency("TMM", 2, "Manat");
putCurrency("TND", 3, "Tunisian Dinar");
putCurrency("TOP", 2, "Pa'anga");
putCurrency("TRY", 2, "New Turkish Lira");
putCurrency("TTD", 2, "Trinidad and Tobago Dollar");
putCurrency("TWD", 2, "New Taiwan Dollar");
putCurrency("TZS", 2, "Tanzanian Shilling");
putCurrency("UAH", 2, "Hryvnia");
putCurrency("UGX", 2, "Uganda Shilling");
putCurrency("USD", 2, "US Dollar");
putCurrency("UYU", 2, "Peso Uruguayo");
putCurrency("UZS", 2, "Uzbekistan Som");
putCurrency("VEB", 2, "Venezuelan bolívar");
putCurrency("VND", 2, "Vietnamese đồng");
putCurrency("VUV", 0, "Vatu");
putCurrency("WST", 2, "Samoan Tala");
putCurrency("XAF", 0, "CFA Franc BEAC");
putCurrency("XCD", 2, "East Caribbean Dollar");
putCurrency("XOF", 0, "CFA Franc BCEAO");
putCurrency("XPF", 0, "CFP franc");
putCurrency("YER", 2, "Yemeni Rial");
putCurrency("ZAR", 2, "South African Rand");
putCurrency("ZMK", 2, "Kwacha");
putCurrency("ZWD", 2, "Zimbabwe Dollar");
</pre>
<p>
where we specify the number of decimals. 
<p>
Now to countries, with their currencies, languages, dialing codes, TLDs, and their capitals, with their coordinates, timezones and what-not, all cross-referenced via ISO codes! Baby steps... :)






]]>

</content>
</entry>
<entry>
<title>First Class Java: Thoughts on a dot notation</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2008/04/first_class_jav_2.html" />
<modified>2008-04-05T14:26:13Z</modified>
<issued>2008-04-05T13:03:52Z</issued>
<id>tag:weblogs.java.net,2008:/blog/evanx/253.9479</id>
<created>2008-04-05T13:03:52Z</created>
<summary type="text/plain">What notation for first-class references to methods, fields, properties and what-not?</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>So last week i started rambling about "First Class Java." Lemme continue while i wait for my clothes to dry on the line outside, whilst i prepare myself for a wedding this afternoon, which i love, especially the eating and drinking and chatting and laughing and dancing part of it. 
<p>
So i was wondering what notation would be neat for first-class references to properties, methods and fields, for this so-called "First Class Java" exercise. 
<p>
Since we have <tt>.class</tt> notation for <tt>Class</tt> eg. <tt>Person.class</tt>, my first thought was to have something similar eg. <tt>.property</tt>, <tt>.field</tt>, <tt>.method</tt> - waddayathink?!
<p>
For example, let's say our <tt>Person.class</tt> has a property <tt>username</tt>. Then we could refer to its <tt>PropertyDescriptor</tt> as <tt>Person.username.property</tt>. 
We might also refer to it's <tt>Field</tt> and accessor <tt>Method</tt> as <tt>Person.username.field</tt> and <tt>Person.getUsername.method.</tt>
<p>
<img alt="monkey1-200.png" src="http://weblogs.java.net/blog/evanx/archive/monkey1-200.png" width="200" height="204" 
align=left />
Comrades here have been touting using a hash (which is quite neat) eg. <tt>Person#getUsername</tt> (for first-class method referencing), and we see things like <tt>Person-&gt;username</tt> for properties. The question is then what non-conflicting notation for fields!?
<p>
<i>(As an amusing side bar on hash notation, many years ago i was hosting two decidedly non-techie friends from London, and roped them into a geeky Linux User Group year-end dinner party. They got thoroughly bored, their heads down with all this technobabble going around and over their heads. The only time i saw them whip their heads up was when they heard the word "hash." Disappointingly for them, not the type they could converse about, but rather further technospeak related to unix scripts, which caused a further shoulder-drop. Heh heh.)</i>
<p>
Back to the beef. Besides the hash and <tt>-&gt;</tt> notations, for closures we see a <tt>=&gt;</tt> notation being bandied about willy-nilly. Urrrrgh!
<p>
The problem is that firstly, i personally dislike with a revulsion that is impossible to put into words adequately, such double-dastardly punctuation symbols like C/C++'s hideous <tt>-&gt;</tt>, and <tt>=&gt;</tt> is even worse! Having said that, i don't mind C/C++'s <tt>&amp;</tt>, and of course we all love it's dot notation for referencing.
<p>
Given that we have too many first-class thingymajigs like properties, methods, fields, and given that Java's preference in general is words rather than punctuation, eg. <tt>extends</tt> rather than C++'s doubly-distastful colons, i say using words like <tt>.method</tt> is better, and inline with Java's existing "dot-word notation" for meta-majiggies ie. <tt>.class</tt>.
<p>
In general, less char's is not better. (Where by "char's" i mean "characters," as a case in point.) Java takes the approach of readability over brevity, eg. <tt>lastKnownWhereabouts</tt> over <tt>lstKnwnWhabs</tt>, and <tt>extends</tt> rather than colons. <i>(Lemme not launch into a whole tirade about unixen <tt>/usr</tt> and <tt>/tmp</tt>, and the elitist-obscuritism to which i am philosophically and psychotically indisposed.)</i>
<p>
Given the above, a related point on the subject of closures is, sure, introduce closures if it's gonna simplify and robustify our libraries, API's and programs. But let's continue Java's legacy of beautiful readability rather than introducing the dastardliness of C++'s duplicitious punctiliousness.
<p>
Enough semantic monkeying around from me - please restore some sense and sensibility to this posting with your affably obliging comments - thank you very much! :)
]]>

</content>
</entry>
<entry>
<title>First Class Java: Call of Duty 4</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2008/03/first_class_jav_1.html" />
<modified>2008-03-25T12:25:02Z</modified>
<issued>2008-03-25T12:24:52Z</issued>
<id>tag:weblogs.java.net,2008:/blog/evanx/253.9413</id>
<created>2008-03-25T12:24:52Z</created>
<summary type="text/plain">Actually the title of this entry should be &quot;Call for Ideas.&quot; On What? &quot;First Class Java.&quot; Wot dat?! An exercise in imagination of a better less bitter more creamy Java language.</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
So i had this vague idea some weeks ago for some blog articles to keep myself amused if no one else. The idea is... to dream of a Java Refined. Not something totally different like JavaFX Script, or Scala et al, but some kind of evolution of the Java language that would be dreamy with a dollop of double-thick cream on top...
<p>
So i started making a list of things i would want, which went something like: first class properties; first class meta stuff like methods (FCM), fields and what-not; better annotations; better generics; structured literal data (eg. XML) and queries and what-not in the language; first-class handling of externalised data like localisable text and customisable what-nots. 
<p>
<img alt="rustic-school2-crop.jpg" src="http://weblogs.java.net/blog/evanx/archive/rustic-school2-crop.jpg" width="243" height="196"  
align=left vspace=8 hspace=8 />
What is the point of this exercise you ask? To have something to think about and doodle about when i'm in my favourite coffee shop, and a topic to blog and converse about like now. 
Now i can't remember all of my wishlist exactly because i left it at home and i'm quite literally a thousand miles from home at the moment...
<p>
Anyways, i remember that when i looked at my list, i thought, what i want is "first class" this that and the other. So i thought lemme call this exercise "First Class Java."
<p>
But enough about me, what about you - how would you evolve the Java language? I'll collate all ya all's ideas, mind-meld them into some kinda concensus of me, myself and you, and write them up in some ongoing fashion for further consideration and discussion, just for the hell of it...
<p>
Having said that, if i win the lottery, i'll sponsor a team to create a slightly new, very Java'esque language with Netbeans support et al. To be honest, first  i would buy myself a few first-class houses, sports cars, jets, yachts, etcetera, then after i've bought all that, i'll sponsor some first-class schools and clinics and what-not in my country (hey i also wanna help Obama make the world a better place), and then after that, i'll sponsor First Class Java with the petty change. Heh heh. ]]>

</content>
</entry>
<entry>
<title>The IDE is the language</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2008/01/the_ide_is_the_1.html" />
<modified>2008-02-13T10:16:11Z</modified>
<issued>2008-01-07T15:53:24Z</issued>
<id>tag:weblogs.java.net,2008:/blog/evanx/253.8929</id>
<created>2008-01-07T15:53:24Z</created>
<summary type="text/plain">Language changes seem to be a contentious topic these days. Personally i want the Java language, libraries et al, to evolve to keep pace with the competition, and not become a staid C or COBOL. Software should continously improve, forever. Generics, properties, closures et al, would have been great for Java 1.0, but failed to make the cut due to the usual business-droid reasons. These features are now being egged on by the competition and some java enthusiasts. A possible different tack for a similar albeit personal result, is for IDE&apos;s to &quot;enhance&quot; views of the language independently of the language itself. </summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
A few years ago, as Linux was gaining traction, I asserted to a colleague, "C is the new assembler,  woohoo!" Some people have said that Java is the new COBOL. Ooo, I hope not! ;) Others have suggested that Java should become the new C. What they mean is, forget about the Java language, it's the JVM that's important, because we should move on to JRuby, JPython, Scala or something more sexy and more productive than Java.
<p>
<img alt="typewriter-crop.png" src="http://weblogs.java.net/blog/evanx/archive/typewriter-crop.png" width="232" height="221" vspace=8 hspace=8 align=left />
Firstly, i consider productivity highly related to the IDE, rather than the compactness of the language's syntax per se. And readability to be more important than code brevity in itself. Also, i don't want to use a language that has a syntax wildly dissimilar to C and Java which i know and love. That means that C# is an option, but one i hope i'll never take, so forget i even said that just now! 
<p>
The point is, i'm not going to switch to Scala ever, even when it has top-level support in my IDE ie. on a par with Java. Because the language syntax is so butt-ugly foreign to me. After 10 years of C, i switched to Java 'cos it was nice and familiar, and now after 10 years of Java, and latterly with Java IDE's, i'm staying put here forever, end of story. 
<p>
So we navigate, view, edit and refactor our Java code using an IDE. Yes, there are those out there that use vi or emacs. But let's face it, they are clearly a lunatic fringe, so let's pretend they don't exist for all intent and purposes ;)
<p>
So we program on the IDE, and behind the scenes, our IDE creates and modifies Java source files on disk, and invokes the compiler to convert those to bytecode. (Maybe bytecode is the new C, and the Java is the new COBOL, but ssh ssh, lemme continue.) Typically, the view provided by the IDE is identical to the Java source code, sans code-folds. But that doesn't have to be the case. Besides the typical folded/unfolded code views, we have other views eg. lists of attributes, methods, bean property value initialisations, event mappings, graphical component tree, visual layout designer, UML diagram, et cetera. 
<p>
<img alt="pig1-200.png" src="http://weblogs.java.net/blog/evanx/archive/pig1-200.png" width="200" height="225" 
height="236" vspace=8 hspace=8 align=right />
Now for argument's sake, say i'm very keen on some new language feature eg. first-class properties. Practically speaking, all i see and care about, is the view of the code as presented and portrayed to me by the IDE i use. So actually, if my IDE had a "first-class properties language module" that presented properties neatly for me, that's all i care about, isn't it!? If my IDE generates and hides the boilerplate of getters and setters, going beyond simple code-folding
into observability and what-not, and cleverly presents and supports completion and refactoring of property literals for me, i'd surely be as deliriously happy and as blissfully ignorant as a pig in strawberries, wouldn't i!? Tangentially, my personal philosophy is that being deliriously happy is circumferential to being blissfully ignorant. Hey, I don't even know what that means, and that's what i dig about it, man!
<p>
My point is, the IDE's view of the language, is the language, for all my intent and purposes. At least in terms of personal coding practicalities, if not literature, code snippets and what-not.
Really, the selfish reason why i would want something new introduced in the language itself eg. first-class property support, is then that would guarantee such support in my IDE. But second prize would be an alternative view i want presented and tooled by my IDE. That would circumvent the controversy and possible impossibility of a language change. All that is required is for me or someone more better, to write such a Netbeans module, that i would choose to use to enhance my personal programming experience and productivity. 
<p>
An addendum is that JSRs and their APIs cannot necessarily exploit such custom conveniences, eg. standardised Beans Binding would never be designed to work with some imaginary custom IDE module. Therefore such IDE modules would have to come with a complementary framework which exploits its conveniences.
<p>
Having espoused all the above nonsense, my final epistle to my apostles is, software should continously improve, forever. Generics, annotations, properties, closures et al, would have been great for Java 1.0, but failing that, why shouldn't they be introduced later on the roadmap? By and large, software evolves or dies. OK, C will always live on as is in the OS eg. Linux kernel et al, and C++ for many native libraries and apps eg. KDE, JVM et al. But the higher level languages such as Python, Ruby, Java and C# are evolving, so as not go the way of COBOL.
<p>
The number of programmers and amount of software written using high-level languages, across the intranets and internets, is umpteen orders of magnitude more than that of system C/C++ programming. And the competition for mindshare amongst these new high-level languages is fierce. So naturally that's where the evolutionary and revolutionary efforts are focussed. One cannot put a brake on competitive innovation. 'Cos that's what makes the world go forward, isn't it?]]>

</content>
</entry>
<entry>
<title>Java Droid</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/11/java_droid_1.html" />
<modified>2008-02-13T10:18:53Z</modified>
<issued>2007-11-21T10:50:52Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.8654</id>
<created>2007-11-21T10:50:52Z</created>
<summary type="text/plain">I was recently travelling, dependent on internet cafes to find maps, hotels, trains and planes. But enough about my life and travels, lemme think out loud again about Android vs JavaFX Mobile. I say the game only gets really interesting when common handsets have converged with personal computers, so these platforms become indistinguishable to consumers and software developers.</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
Recently i was travelling through Europe for three months without my laptop and/or its 3G wireless internet connection, sometimes cycling in the French Pyrenees, not knowing for sure if i would find a bed at the next town, after many hours in the saddle, running out of sunlight, not to mention energy. One of many things i learnt from this wonderful experience is that cellphones ought to have practical web browsers. They ought to negate the need for finding an internet cafe,  but they don't, not mid-level handsets anyway. I bought one of the latest Nokia 3G feature phones in London for &pound;89.99, with which i took photo's and sent SMS'es to my heart's content, but browsing the web was not practical eg. searching for accommodation, checking maps, train schedules, booking flights and what-not.
<p>
<img alt="phone6-200.png" src="http://weblogs.java.net/blog/evanx/archive/phone6-200.png" width="200" height="150" 
align=left hspace=16 vspace=8 />
Reading a few blogs et al, one gets the impression that everyone immediately assumes that Android will be a success. Arguably Google's brand, money, reputation, talent, web apps and userbase all but guarantee this, as illustrated by the size and scope of the Open Handset Alliance. However this alliance excludes Sun and Nokia for example, who have been investing in existing mobile Java platforms for quite some time. Might JavaFX Mobile eg. an opensource JavaSE/JavaME/Linux mobile stack, join the Blackberry, the iPhone and Android as a smartphone game-changer?
<p>
As we now know, Android is another opensource mobile platform, built on Linux et al, with an Apache-licensed Java'esque layer ie. Harmony, Dalvik VM and android.* which includes a brand new UI toolkit.
<p>
Many handset makers welcome this free offering from Google, who is vendor-neutral, and bidding on the 700Mhz spectrum to boot. 
Opensource OS'es aren't dominating consumer PCs, and consumers aren't crying out for opensource handsets per se. 
But phones that integrate well with your favourite Google services may be very attractive to customers.
Nokia, RIM and Apple have their own smartphone software platforms,  and so they aren't in the OHA, where handset makers commit to producing an Android phone. Carriers want to offer great phones to their customers, but also they are a conservative bunch, and concerned about VoIP and IM impacting their revenue, not to mention dual-mode handsets that can switch at wifi hotspots. 
<p>
Are developers crying out for yet another mobile platform? If it affords total freedom on millions of truely open handsets, then for sure. 
I'm crying out for extending the PC platform to mobiles, so i can write once, run everywhere. Android steps in that direction, being a Linux-based mobile platform. But it is a divergence from mobile Java efforts and standards many years in the making, through collaboration by the major players eg. Sun, Nokia, et al. Android employs the Java programming language, but unfortunately is not a standard or complete Java platform, ie. it doesn't commit to JavaME or JavaSE. Having said that, JavaME is bound to be supported 
on many Android-based handsets, and in time maybe JavaSE too. 
<p>
There are other Linux-based mobile platforms, and JavaME is pretty universal, so Android is a non-standardised upstart at this stage. We can only wait to see the market penetration of Android handsets in the years ahead, and how developers and other players respond, eg. Sun with JavaFX Mobile. Android's APIs might become a JSR which is then included in the JavaFX Mobile stack, and/or JavaFX Mobile might leverage Android's OS? Who knows!?
<p>
The hype around the Blackberry, iPhone and future gPhones is contributing to the rapid growth of the smartphone market in general.   
And today's smartphones are tomorrow's affordable handsets. 
To my mind the game then gets really interesting when common handsets have converged with personal computers, and these platforms become indistinguishable to consumers and software developers. Gimme a handset with Linux, Firefox, JavaSE, Swing and Webstart - otherwise it's just a gimmicky ol' phone, innit!? 
]]>

</content>
</entry>
<entry>
<title>What is Android vs JavaFX Mobile?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/11/what_is_android.html" />
<modified>2008-02-13T10:18:45Z</modified>
<issued>2007-11-13T18:45:56Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.8643</id>
<created>2007-11-13T18:45:56Z</created>
<summary type="text/plain">&quot;Oh so you get Java on telephones now?!&quot; </summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
So the "personal computer" platform with its graphics, internet et al, is converging with telephony handsets, and visa versa. It's nice.
I'm trying to understand how Android changes the pace of this convergence, and how it's different to JavaFX Mobile.  
<p>
<img alt="Phone200.png" src="http://weblogs.java.net/blog/evanx/archive/Phone200.png" width="200" height="194" 
align=left hspace=8 />
So JavaFX Mobile is the mobile software stack formerly known as SavaJE. Looking at the spelling, we guess that SavaJE was about JavaSE on mobiles. Its apps are written in Java, including the telephony ones, 'cos it affords full access to the handset's telephony hardware functionality, eg. for making calls, handling SMS'es and what-not.
Maybe JavaME offers relatively limited access to the hardware? Certainly it's not full-blown desktop Java either. 
<p>
Yes please, we want the full JavaSE with Swing on mobile phones already. 'Cos these devices have the CPUs, RAM and display resolutions that our PCs had when Java first started practising its love all across the internets.
<p>
Some reading suggests that SavaJE was built on a minimal Linux kernel, and that JavaFX Mobile is a Linux/Java stack. Android is also a Linux/Java stack, so, um, can someone please tell me if Android competes with JavaFX Mobile, and what their differences, similarities and/or respective futures, might be? 
<p>
Android is opensource, in fact it's Apache-licensed, and uses Apache Harmony's class libraries. (Linux is GPL, as are many of the native libraries in Android's stack, so it clearly isn't entirely Apache-licensed.)
Is JavaFX Mobile to be opensourced? If it has to compete with Android, then i guess it will be GPL'ed.
<p>
It seems that Android does not put Swing front-and-center at this stage, and maybe that differentiates Android and JavaFX Mobile in their initial incarnations.
Will Java developers have to choose between these two mobile platforms, or will handsets support both JavaFX/Swing and Android? That's hard to imagine, given that JavaFX uses OpenJDK and Android  uses Apache Harmony, isn't it?
<p>
<i>Credits: The image is a print of "Grandpa's Phone" by Hans Oosterban. One quote is inspired by Homer Simpson's "Oh, so they have Internet on computers now!" Another is a Bushism or two in disguise.</i>


]]>

</content>
</entry>
<entry>
<title>Gooey Table Model</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/10/gooey_table_mod.html" />
<modified>2008-02-13T10:18:42Z</modified>
<issued>2007-10-02T14:33:34Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.8239</id>
<created>2007-10-02T14:33:34Z</created>
<summary type="text/plain">We present a generic table model with a list of &quot;model beans&quot;
and simplistic &quot;beans binding&quot; facilitated by java.beans.PropertyDescriptor.
</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
<a style='text-decoration: none; color: black;' 
href="https://aptframework.dev.java.net/gooey/tableModel.html">
<img border=0 src="http://weblogs.java.net/blog/evanx/archive/kcoloredit.png" width="32" height="32" 
align="left" hspace="8"/>
<div style="border-bottom: solid 1px; background-color: yellow;">
<span style="font-style: normal; font-weight: bold;"><span style="color: black;">Click here to read "Gooey Table Model, an informative column"</span>
<br><span style="font-style: italic; color: black;">A part of "Gooey Beans, a trilogy in 42 parts"</span>
</a>
</div>
</a>
<p>
We introduce a generic table model supporting a list of backing beans,
with simplistic "beans binding" facilitated by <tt>java.beans.PropertyDescriptor</tt>.
<p>
<table>
<tr><td>
<form action='https://aptframework.dev.java.net/gooey/tableModel.html'> 
<a href='https://aptframework.dev.java.net/gooey/tableModel.html' 
  style="text-decoration: none;">
<input type=submit value='Read Gooey Table Model' />
</a>
</form>
</table>
<p>
<!--name='demo'--><br><b><u><i>Demo</i></u></b>

<p>
The following demo exercises our table models (and forms). 
<p>
<img alt="divvy.png" src="http://weblogs.java.net/blog/evanx/archive/divvy.png" width="700" height="373" />
<p>
<a href="https://aptframework.dev.java.net/jnlp/personinfo.jnlp">
   <img border="0" src="http://javadesktop.org/javanet_images/webstart.small.gif" alt="Launch"/></a>
   &nbsp; <i>(PirateWarez, 150k/500k, unsandboxed, Java6)</i>
<br>
<p>
Incidently, notice how the selection works, eg. click on the search icon to select the person, 
and enter a blank product ID to select some booty! ;)
Later in this series, we'll look at a popup finder for entities.
<p>
<!--name='code_snippet'--><br><b><u><i>Code Snippet</i></u></b>

<p>
We implement a table model in our application as follows.
<p>
<pre><span style='color: #000099; font-weight: bold;'>public</span> <span style='color: #000099; font-weight: bold;'>class</span> ProductMovementDetailTableModel <span style='color: #000099; font-weight: bold;'>extends</span> GTableModel&lt;ProductMovementDetail&gt; {
    ProductMovementDetailInfo info = <span style='color: #000099; font-weight: bold;'>new</span> <span style='font-weight: bold;'>ProductMovementDetailInfo</span>();
    
    GTableColumn productId = <span style='font-weight: bold;'>createColumn</span>(info.productId);
    GTableColumn label = <span style='font-weight: bold;'>createColumn</span>(info.label);
    GTableColumn productUnit = <span style='font-weight: bold;'>createColumn</span>(info.productUnit);
    GTableColumn unitCost = <span style='font-weight: bold;'>createColumn</span>(info.unitCost);
    GTableColumn quantity = <span style='font-weight: bold;'>createColumn</span>(info.quantity);
    GTableColumn amount = <span style='font-weight: bold;'>createColumn</span>(info.amount);
    
    <span style='color: #000099; font-weight: bold;'>public</span> <span style='font-weight: bold;'>ProductMovementDetailTableModel</span>() {
        <span style='color: #000099; font-weight: bold;'>super</span>(ProductMovementDetail.<span style='color: #000099; font-weight: bold;'>class</span>);
        <span style='color: #707070;'>... // setEditable() on column objects</span>
    }    
}
</pre>
<p>
where we create column objects to contain metadata eg. column headings, types, <i>et cetera.</i>
<p>
Each row of the table has a backing bean, eg. <tt>ProductMovementDetail</tt> in the above example. 
As presented in the <a href='https://aptframework.dev.java.net/gooey/beanInfo.html'><u>Gooey Beans Info</u></a> prequel,
we define metadata for the bean's properties in a "bean info" object, 
eg. <tt>ProductMovementDetailInfo</tt>. The column objects wrap "property info" objects which are
created in the bean info class. 
<p>
A controller is implemented to handle events from the table component, 
eg. row selection and cell editing. 
The beans and column objects are used in these event handlers to reference 
rows and columns.
<p>
Disclaimer: This design predates JSR 295 (Beans Binding), which is the future, 
and so will be presented in future, in this series' 2nd Edition ;)
<p>
Incidently, the days of my publishing an article every month in this <a href='https://aptframework.dev.java.net/foundation/contents.html'><u>Foundation</u></a> series
seem to have come to an end, because i've been travelling.  
Right now i'm in Germany, and from next week i'll be cycling across southern France 
and northern Spain (woohoo!) without a computer, so um, zero productivity...
<p>
<br>
<p>
<table>
<tr><td>
  <form action='https://aptframework.dev.java.net/gooey/tableModel.html'> 
    <a href='https://aptframework.dev.java.net/gooey/tableModel.html' 
      style="text-decoration: none;"><input type=submit value='Gooey Table Model' /></a>
  </form>
<td>
  <form action='https://aptframework.dev.java.net/jnlp/personinfo.jnlp'>
    <a href='https://aptframework.dev.java.net/jnlp/personinfo.jnlp' 
      style='text-decoration: none;'><input type=submit value='PirateWarez Demo'/></a>
  </form>
<td>
  <form action='https://aptframework.dev.java.net/gooey/contents.html'>
    <a href='https://aptframework.dev.java.net/gooey/contents.html'
      style="text-decoration: none;"><input type=submit value='Other Gooey Stories'/></a>
  </form>
<td>
  <form action='https://aptframework.dev.java.net/foundation/contents.html'>
  <a href='https://aptframework.dev.java.net/foundation/contents.html'
  style="text-decoration: none;"><input type=submit value='Foundation Trilogy'/></a></form>
  </form>
</table>
<p>
]]>

</content>
</entry>
<entry>
<title>what i read about today on the computer internet: OpenProj</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/09/what_i_read_abo.html" />
<modified>2008-02-13T10:18:35Z</modified>
<issued>2007-09-05T18:29:50Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.8185</id>
<created>2007-09-05T18:29:50Z</created>
<summary type="text/plain">Today i noticed OpenProj, an opensource Java/Swing app to replace MsProject. This is a fairly big deal, isn&apos;t it? Maybe it&apos;s been mentioned on java.net already but i missed it cos i&apos;ve been doing the equivalent of living under a rock for the past few weeks, in particular globe-trotting in an oft disconnected and somewhat disoriented state. </summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
I was excited to read about <a href=http://openproj.org/>OpenProj</a> just now.
This helps out the opensource desktop by providing an alternative to MsProject, innit.
<p>
But i got even more excited when i noticed it's a Java/Swing app, as can be seen from the <a href=http://openproj.cvs.sourceforge.net/openproj/>OpenProj CVS</a>.
It's always interesting to invetigate how relatively large and serious Swing apps are cobbled together, and to try to pick up a few tips. 
So I look forward to checking it out, and maybe writing a blog entry or two, should i be so inspired. 
<p>
<i>Having said that, i've managed precious little time for anything serious since leaving Cape Town a month ago. I've visited friends and family in Johannesburg, London, and currently Russia. In a couple of weeks, Germany, and thereafter (hopefully) i'll be cycling across South of France, over the Pyrennes, and across Northern Spain!? That's still just a dream that i can't believe might actually happen next month, so...
<br> &nbsp;&nbsp;&nbsp;
I'll be cycling sans my XP notebook obviously, and generally be totally disconnected from anything except my thoughts, which i hope will be centered on the background for a science-fiction book i wish to try to write... Maybe as a blog rather than a book!? Mmmm... crumbled up scifi blog entry thingies...
</i>
<p>
But i do have a Swing article to finish and publish next week or so, called <i>Gooey Table Model.</i> After that, i'll be under the radar for a month or two...
<p>
So has anyone tried out OpenProj? (I haven't cos i'm on an antiquated Windows98 machine right now, with a painfully slow dial-up connection, and no java...)
<p>
Hey the other thing that i invetigated today on the computer internet thingymajig was the H2 database. But i'll ramble incoherently about that tomorrow... ]]>

</content>
</entry>
<entry>
<title>Gooey Goals</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/07/gooey_goals.html" />
<modified>2008-02-13T10:18:24Z</modified>
<issued>2007-07-26T13:26:53Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.7919</id>
<created>2007-07-26T13:26:53Z</created>
<summary type="text/plain">I gave a talk at Cape Town JUG last night, and in order to punt my upcoming pet project &quot;Gooey&quot; framework, i had to actually think and decide about what it is and what are it&apos;s goals and features because I had no idea ;)</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
So i gave this talk, discussing the following stuff:
<ul>
<li>JSR 296
<li>JSR 295
<li>Swing - "the State of the Nation" according to um, Me!
<li>The Problem with Strings
<li>Gooey (my upcoming thingymajig in the near future)
<li>Meme (my upcoming thingy in the far distance)
<li>Technical writing 
<li>Opensource
</ul>
<p>
<b>JSRs 295 and 296</b>
<p>
I gave an overview of what and where JSR 295 and 296 are, with special emphasis that both have public java.net sites with active mailing lists, where all the excitement is happening, and open to everyone to 
join the fun, which is "A Very Good Thing" :) 
<p>
<i>"It's the way of the future, It's the way of the future, It's the way of the future..." (Howard Hughes' character in the Aviator, loosing it.) I used to say that incessantly to my niece to irritate her. Then i left somewhere for three weeks, and returned, lapsing immediately into "It's the way of the future, It's the way of the future..." as soon as she entered my vicinity. Heh heh. No, i hadn't been mumbling it for three weeks! ;)</i>
<p>
I suggested that JSR 296 was well scoped to address 
basic good practice of Swing development, namely Lifecycle, Resource Injection, Actions/Tasks, and Session State.
<p>
I suggested that i wasn't sure about JSR 295's scope, because on the one hand it is designed to be "beans binding for everything" ie. to bind one property to another property generically, and on the other hand it is implemented specifically as "beans binding for Swing components." I think it might be layered as such, eg. basic property-to-property beans binding (and groups of bindings), and building a Swing layer on top of that, or next to that, which might reuse/extend some basic interfaces, but otherwise is very specific eg. to <tt>JTable</tt> et al. I've lost track a little bit there, with all the frenetic activity :)
<p>
<b>Swing</b>
<p>
I suggested that Swing is onwards and upwards at the moment :)
<ul>
<li>Netbeans is shaping up very nicely, eg. with Matisse, and next up, JSRs 296 and 295 support in Netbeans 6.0.
<li>WebStart is a potentially fantastic technology, and hopefully it's shortcomings (eg. scalability, i'm told) will be ironed out, so that it can deliver on its awesome potential. 
<li>Swing potentially fits in very well with the JEE juggernaut, eg. using WebStart, webservices and/or JPA et al. 
<li>Consumer JRE, perhaps prompted by JavaFX, will benefit Java/Swing too, and other languages on the platform, eg. Groovy/Swing et al. 
</ul>
<p>
<b>Strings</b>
<p>
I was banging on as usual about the problem with string references eg. for properties for binding, JPA queries (in strings), component names for resources, et al - they're not toolable as in refactoring, auto-completion... 
<p>
I suggested that software naturally degrades, and without refactoring, a broken window left unrepaired will lead to a horribly run-down building before very long.  
<p>
Test coverage is meant to address this ie. to make refactoring feasible. But what about maximum assistance from the IDE, eg. auto-completion et al, when it comes to referencing properties, resources, XML elements, in JPA queries, et al!? 
<p>
In an ideal world, the language together with the tools will enable totally safe refactoring on one hand, as well as maximum productivity on the other, ie. prompting, auto-completion, and error highlighting. And of course we always want compile-time errors rather than runtime ones eg. caused by unresolved string references. 
<p>
<b>Gooey</b>
<p>
After a year so in development, i'm getting to stage where i want to whip this dodgy framework of mine into some kinda state, to release on <tt>gooey.dev.java.net</tt>. My goals are to address <i>my</i> requirements as follows ;)
<p>
<ul>
<li>A "container for worksheets," ie. a frame with a menu bar, tool bar, status bar, and main tabbed pane, with lifecycle support eg. for launching worksheets as new tabs. (See <i>Framewarez</i> altho out-of-date - <i>Gooey Frame</i> due in coming months.) 
<li>Simplistic beans binding, as in a "presentation model" approach for forms, and tables. (See <i>Gooey Bean Info</i> et al.)
<li>MVC architecture, where Netbeans is used for the View, ie. designing pretty forms, but our controller is the main event, 
and has no generated uneditable code. (See <i>Gooey Beans Form</i>.) 
<li>For forms, we use bound "input component adapters" to enable the controller to control components in the View, eg. <tt>setEnabled()</tt> and what-not, ie. via delegation. These are bound to the Model beans on the one side, and the Swing components on other ie. in the View. (See <i>Gooey Beans Form</i>, and upcoming <i>Gooey Table Model</i> in August.)
<li>Support for basic automated layout eg. of beans-bound forms, for rapid prototyping, while fully expecting to switch over to Netbeans' designer at a moment's notice when things get real. (See <i>Gooey Beans Form</i>, and <i>Group Layout Therapy</i>.) 
</ul>
<p>
<b>Meme</b>
<p>
This will be an experimental ORM using meta entity objects, and entity property objects to reference "tables and columns" for queries, ie. so that entities are refactorable, without fear of breaking queries. 
(See the <i>Dog House</i> article.) 
<p>
<b>Technical Writing</b>
<p>
I do technical writing as a design exercise. When you write about code, you notice areas for improvement. It's like a self review mechanism, innit. Aiii.
<p>
Also writing reinforces my "Simplicity through Multiplicity" principle. The more classes, and the more methods, the better. If it's easier to explain, then it's probably easier to read and understand too. 

<p>
<b>Opensource</b>
<p>
I discussed the difference between the GPL and Apache licenses, and suggested that people license frameworks and such-like under Apache, so that companies can reuse their code, without having to track what they're changing - which potentially makes it impractical to assimilate your framework into their code-base. "If you love something, set it free." ;) It's counter-intuitive that it's best to surrender control, but invariably that turns out to be best option, in hindsight.

<p>
<br>

<table>
<tr>
<td>
  <form action='http://aptframework.dev.java.net/jnlp/personinfo.jnlp'>
    <a href='http://aptframework.dev.java.net/jnlp/personinfo.jnlp' 
      style='text-decoration: none;'><input type=submit value='PirateWarez Demo'/></a>
  </form>
<td>
<form action='https://aptframework.dev.java.net/gooey/beanProxy.html'> 
<a href='https://aptframework.dev.java.net/gooey/beanProxy.html' 
  style="text-decoration: none;">
<input type=submit value="Gooey Bean Proxy" />
</a>
</form>    
<td>    
  <form action='https://aptframework.dev.java.net/gooey/contents.html'>
    <a href='https://aptframework.dev.java.net/gooey/contents.html'
      style="text-decoration: none;"><input type=submit value='Gooey Content'/></a>
  </form>
<td>
  <form action='https://aptframework.dev.java.net/foundation/contents.html'>
    <a href='https://aptframework.dev.java.net/foundation/contents.html'
      style="text-decoration: none;"><input type=submit value='Foundation Trilogy'/></a>
  </form>
</table>



]]>

</content>
</entry>
<entry>
<title>Gooey Bean Proxy</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/07/gooey_bean_prox_1.html" />
<modified>2007-07-24T16:17:54Z</modified>
<issued>2007-07-23T14:39:52Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.7902</id>
<created>2007-07-23T14:39:52Z</created>
<summary type="text/plain">We expose a bean&apos;s properties eg. for a presentation model, using an interface, which we use to create a dynamic proxy, 
eg. with a backing Map of property objects (and property values), eg. for rapid GUI prototyping, or otherise a java.bean, eg. to reference properties without using string literal references. 
</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
We expose a "presentation model" bean using an interface, used to create a dynamic proxy, 
with a backing <tt>Map</tt> of property/values eg. for GUI prototyping, or otherwise a <tt>java.bean</tt>. 
<p>
<p>
<a style='text-decoration: none; color: black;' 
href="https://aptframework.dev.java.net/gooey/beanProxy.html">
<img border=0 src="http://weblogs.java.net/blog/evanx/archive/kcoloredit.png" width="32" height="32" 
align="left" hspace="8"/>
<div style="border-bottom: solid 1px; background-color: yellow;">
<span style="font-style: normal; font-weight: bold;"><span style="color: black;">Click here to read "Gooey Bean Proxy"</span>
<br><span style="font-style: italic; color: black;">A part of "Gooey Beans, the GUI part of a trilogy in 42 parts"</span>
</div>
</a>
</p>
<p>
<p>
<table>
<tr>
<td>
<form action='https://aptframework.dev.java.net/gooey/beanProxy.html'> 
<a href='https://aptframework.dev.java.net/gooey/beanProxy.html' 
  style="text-decoration: none;">
<input type=submit value="Read Gooey Bean Proxy" />
</a>
</form>
</table>
<p>
<p>
<!--name='code_snippet'--><br><b><u><i>Code Snippet</i></u></b>

<p>
We expose the properties of the presentation model using an interface as follows.
<p>
<pre><span style='color: #000099; font-weight: bold;'>public</span> <span style='color: #000099; font-weight: bold;'>interface</span> PersonInfo <span style='color: #000099; font-weight: bold;'>extends</span> GObservableBean {
    GProperty&lt;String&gt; <span style='font-weight: bold;'>username</span>();
    GProperty&lt;String&gt; <span style='font-weight: bold;'>firstNames</span>();
    GProperty&lt;String&gt; <span style='font-weight: bold;'>lastName</span>();
    GProperty&lt;String&gt; <span style='font-weight: bold;'>displayName</span>();
    GProperty&lt;String&gt; <span style='font-weight: bold;'>email</span>();
    GProperty&lt;Date&gt; <span style='font-weight: bold;'>birthday</span>();
    GProperty&lt;Date&gt; <span style='font-weight: bold;'>lastLogin</span>();
    GProperty&lt;BigDecimal&gt; <span style='font-weight: bold;'>score</span>();
    GProperty&lt;PersonTitle&gt; <span style='font-weight: bold;'>title</span>();
    GProperty&lt;PersonGender&gt; <span style='font-weight: bold;'>gender</span>();
    GProperty&lt;PersonMaritalStatus&gt; <span style='font-weight: bold;'>maritalStatus</span>();
}
</pre>
<p>
In this case, we can use "dynamic proxies" (from <tt>java.lang.reflect)</tt>, to access our bean 
properties, rather than looking them up using string literal references eg. via <tt>BeanInfo</tt>. 
Our proxy object will use the <tt>Method</tt> name to look up the property. 
<p>
Also, we have the option of not creating a backing bean for starters, which lends itself 
towards rapid prototyping, since the above property interface is clearly quite concise. 
<p>
<br>
<p>
<table>
<tr>
<td>
<form action='https://aptframework.dev.java.net/gooey/beanProxy.html'> 
<a href='https://aptframework.dev.java.net/gooey/beanProxy.html' 
  style="text-decoration: none;">
<input type=submit value="Gooey Bean Proxy" />
</a>
</form>    
<td>    
  <form action='https://aptframework.dev.java.net/gooey/contents.html'>
    <a href='https://aptframework.dev.java.net/gooey/contents.html'
      style="text-decoration: none;"><input type=submit value='Gooey Content'/></a>
  </form>
<td>
  <form action='https://aptframework.dev.java.net/foundation/contents.html'>
    <a href='https://aptframework.dev.java.net/foundation/contents.html'
      style="text-decoration: none;"><input type=submit value='Foundation Trilogy'/></a>
  </form>
</table>
]]>

</content>
</entry>
<entry>
<title>Half Baked Beans</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/07/half_baked_bean.html" />
<modified>2008-02-13T10:17:59Z</modified>
<issued>2007-07-20T11:37:30Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.7890</id>
<created>2007-07-20T11:37:30Z</created>
<summary type="text/plain">I decided how i&apos;m gonna do properies for my own gooey purposes. I like!</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[Let's define a minimal property interface.
<p>
<pre>
public interface Property&lt;V&gt; {
  public void set(V value);
  public V get();   
}
</pre>
<p>
where its implementation wraps a <tt>java.bean.PropertyDescriptor</tt>. 
<p>
Now baked beans...
<p>
<pre>
public interface BakedBeanInfo&lt;B&gt; {
  public Property getProperty(String propertyName);
}
</pre>
<p>
where its implementation wraps a <tt>java.bean.BeanInfo</tt>, and
constructs a collection of the bean's <tt>Property</tt> instances. 
<p>
Now the trick is we expose our bean/properties as an interface...
<p>
<pre>
public interface PersonInfo {
   Property&lt;String&gt; username();
   Property&lt;String&gt; displayName();
   Property&lt;Integer&gt; age();
   ...
}
</pre>
<p>
where we use dynamic proxies to create a bean, and/or bean info, 
without worrying about the implementation (eg. <tt>QBeanInfo</tt>  presented in <a href=http://aptframework.dev.java.net/gooey/contents.html><i>Gooey Bean Info</i></a> et al). 
<p>
<pre>
   PersonInfo personBean = GBeanFactory.createObservable(PersonInfo.class);
   ...
   GTableModel&lt;PersonInfo&gt; tableModel = new GTableModel(PersonInfo.class);
   GForm&lt;PersonInfo&gt; form = new GForm(PersonInfo.class);
   ...
      logger.info(tableModel.getSelected().displayName().get());
      form.set(tableModel.getSelected());      
</pre>
<p>
where we bind to a backing bean instance (eg. <tt>Person.class</tt>) ie. a POJO/<tt>java.bean</tt> with accessors/mutators - or not eg. just use the proxy instance as our presentation model.
<p>
Lemme repeat... For prototyping, we might not worry about creating a <tt>Person.class</tt>, but just use the bean info interface to create our observable beans (via dynamic proxy), with built-in <tt>PropertyChangeSupport.</tt>
<p>
Our <tt>Property</tt> implementation might let us specify (default) presentation properties (eg. label, display width, format et al) of that property, and attach validators, as in <i>Gooey Bean Form</i>.
<p>
waddaya think?!
<p>
PS. The next installment on <i>Gooey Beans</i> is immiment at last, about <tt>JTable</tt>'s, since i got the demo working, as in the following sneak preview, woohoo! :) 
<br>
<p>
<img alt="divvy.png" src="http://weblogs.java.net/blog/evanx/archive/divvy.png" width="700" height="373" />
<p>
<a href="http://aptframework.dev.java.net/jnlp/personinfo.jnlp">
   <img border="0" src="http://aptframework.dev.java.net/gooey/images/webstart.small.gif" alt="Launch"/></a>
   &nbsp; <i>(PirateWarez , 150k/500k, unsandboxed, Java6)</i>
<p>
Notice how the selection works, eg. click on the search icon to select the pirate, and enter a blank booty barcode to select some booty! Later i'll look at a popup finder for entities, rather than switching tabs as it currently works.
<p>
<br>
Before all that, i'll implement and write an article on the above baked beans, to publish this month in <i>Gooey Beans</i> - and then publish
the <tt>TableModel</tt> article in a coupla of weeks, before i set off on my travels to UK, Russia, Nepal, Ireland et al - <i>Eet's nice... very very frikkin nice! Woohoo! Mmmmm.... Planet Earth...</i>
<p>
<br>
<table>
<tr>
<td>
  <form action='http://aptframework.dev.java.net/jnlp/personinfo.jnlp'>
  <a href='http://aptframework.dev.java.net/jnlp/personinfo.jnlp' 
  style='text-decoration: none;'><input type=submit value='PirateWarez Demo'/></a></form>
<td>
  <form action='http://aptframework.dev.java.net/gooey/contents.html'>
  <a href='http://aptframework.dev.java.net/gooey/contents.html' 
  style='text-decoration: none;'><input type=submit value='Gooey Contents'/></a></form>
<td>
  <form action='http://aptframework.dev.java.net/foundation/contents.html'>
  <a href='http://aptframework.dev.java.net/foundation/contents.html'
  style="text-decoration: none;"><input type=submit value='Foundation Trilogy'/></a></form>
</table>


]]>

</content>
</entry>
<entry>
<title>My usual blah blah blah</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/07/my_usual_blah_b.html" />
<modified>2007-07-18T22:11:33Z</modified>
<issued>2007-07-18T21:50:23Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.7874</id>
<created>2007-07-18T21:50:23Z</created>
<summary type="text/plain">In response to a blog that &quot;the desktop is becoming obsolete&quot; and will become obsolete, because of Web2.0, i rehashed all my usual blah blah blah - which i&apos;m getting tired of spouting like a broken record, but i just can&apos;t help it! </summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
In <i><a href="http://blogs.cnet.com/8301-13506_1-9745832-17.html">The future of Windows should be open source</a>,</i> the author suggests
that <i>"the desktop is becoming obsolete."</i> This always gets my back up! (If you ever want to get a rise out of me, just say exactly that!)
My comment was a regurgitation of what i always say on this subject, which is getting so frikkin boring, that i'm boring myself to tears, but since i wrote such a long comment, i thought i would cut and post it, and here it is again. I know, gutting. 
<p>
iTunes is a desktop/internet app. Expect to see more such apps, 
ie. "internet apps" which are also "desktop apps" - that run outside 
the browser rather than within it.
If you think it's possible to implement the rich Office experience using HTML/Ajax... you're stupid, no offense ;) What about an IDE as an ajax web app - ouch!
<p>
One can try to emulate desktop apps with web apps, but you'll never get a richer, more responsive user experience, with the same multitude of features - and of course OpenOffice, Kontact et al are improving all the time. And broadband means... click-and-run (and auto-update). Download times are a rapidly diminishing concern...
<p>
<img alt="KDE2.png" src="http://weblogs.java.net/blog/evanx/archive/KDE2.png" width="219" height="297" align=left vspace=16 hspace=16 />
We have great opensource desktop software like OpenOffice, KDE, GNOME and all their apps - to suggest that we are just going to throw all that away and be left with a single app, the web-browser, as a single full-screen window, with all our apps running inside it, 
ie. supplant the likes of KDE and GNOME with just Firefox on X, is just silly. 
<p>
And why even try to supplant great opensource apps with half-baked web apps full of ads?! 
Rather make the opensource apps like OpenOffice more "webby."
Cos why can't apps run outside the browser? Why does everything have to run inside the browser - including Office, email et al - that's just silly!
<p>
The web browser (eg. Firefox) will never match the abilities of the OS/desktop (eg. Linux/KDE/GNOME) in terms of managing resources, processes, application windows, eg. tabbing, switching, minimising, exposing, etcetera, etcetera. 
Why try to turn a cute 5Mb browser into the 100Mb gorilla of a full-blown graphical desktop environment, 
when the likes of KDE and GNOME exist?
<p>
No one will ever again develop a graphical desktop environment, from scratch, that can catch up to KDE and GNOME, or would want to... 
MacOSX is NextStep legacy underneath, and Windows is also legacy proprietary rubbish underneath. 
<p>
So to summarise, rather than desktop apps going away, desktop apps will become more leveraging of the internet and leveragable via the internet, eg. launch from the internet, persist settings et al to the internet eg. using REST, ie. be everything that is good about web apps. Desktops apps already auto-update from the internet which you might have noticed, so... onward and upward!
<p>
PS. With the advent of internet retailing, eg. amazon.com and the like, people started falling over themselves saying, "This is the future! Bricks-and-mortar retailers will surely all close down!?" Well they didn't. They took what was good about the internet, and added it to what they already had, which was good, and they got better all around. I'll warrant it's gonna be the same with the desktop. Life goes on much as before, just better. 
<p>
PS. So I think the category "web apps" should make space to include both "browser apps" as well as "webby desktop apps" eg. Webstart Swing apps that use webservices, and not the local filesystem (except for caching and cookies, like a browser).
]]>

</content>
</entry>
<entry>
<title>My checklist for the next year</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/07/my_checklist_fo_1.html" />
<modified>2007-07-14T13:43:34Z</modified>
<issued>2007-07-14T13:43:25Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.7857</id>
<created>2007-07-14T13:43:25Z</created>
<summary type="text/plain">Things i must do, things i wanna write...</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>
<dc:subject>Community: JavaDesktop</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
<b><u>Things to Streamline</u></b>
<p>
I recently started writing a Swing feed reader (FeedTrove.dev.java.net) - which i was on my checklist, so that's ticked - but i have still more things to do there...
<p>
<ul>
<li>Rather than using an HTML JTextPane, i want to try to render all the stories on a canvas, to get full control, anti-aliased font's, etcetera. Another option would be to use Flyingsaucer, but that is quite big, and quite a few jars which confused me when i wanted to give it a try. Anyway, it's a Swing app, so i guess i should be using Swing graphics rather than XHTML/CSS!?
<li>Ditto, for the console. I have an HTML JTextPane console in QuiteGooey - but i wanna try using Swing to render LogRecord's using beautiful fonts and colors and layout. I need this for other Swing apps too, eg. cute RIAs like a chat client... 
<li>Add more components into the app, like a JTable (showing feeds), and form (with JTextFields et al, for settings and options) - just for the sake of rounding off the framework i'm spinning out of it (called Gooey.dev.java.net, which is an AppFramework-based minimalist rehash of QuiteGooey - which i am also currently refactoring and simplifying on it's own, so all quite confusing, innit?!)
</ul>
<p>
<b><u>More Swing</u></b>
<p>
Besides a feed reader, i have a few other "small" swing apps i want to write (desperately!)
<ul>
<li>A simple chat client, which may be the beginnings of a Swing-based social network RIA type application?! (Hey, I want to a billionare too! ;)
<li>A calendar/reminder "desklet" - a name i'd like to "coin" for Swing desktop apps that are launched from the internet ie. WebStart, and interact with an internet server using REST, rather than the local filesystem - ie. they are "stateless" on the client-side, in the sense that a web-browser is stateless app. 
<li>A workflow/bug/issuetracking app, like the numerous web-based ones, but in Swing, using REST to backend servlets. 
</ul>
<p>
<b><u>Wheels to Reinvent</u></b>
<p>
Even though i know the future of web development is JEE/JSF/Seam, because it's standardised, i like interesting approaches like Wicket and Echo2, ie. using Java code (rather than XHTML et al) to build user interfaces ie. a hierachal composition of components. So i started a research project (divlet.dev.java.net) to experiment with that. Having done the basics, I still have two or three big issues to solve in my mind and implement in my svn, but no rush. 
<ol>
<li>Composition of pages ie. templating.
<li>Componentisation, eg. flexible, extensible InputText, DataTable components. 
</ol>
<p>
<b><u>Things to Finish</u></b>
<p>
The "Gooey Beans" series on aptframework.dev.java.net has temporarily stalled because of two many things on my plate! But i want finish that  off in the next few months - with an article per month - including this month! So I got back into it this week, after a few months' neglect. Actually it'll never be finished, but i want to solve some "big" remaining issues for me...
<ol>
<li>data bean bound JTable's
<li>Componentisation of lookup fields, eg. for entering/finding persistent entities, eg. using a combination of a JTextField, 
"search by..." dropdown, maybe high-volume auto-completing JComboBox and/or popup JTable et al for high-volume multi-column scanning, with JLabel to display the selected entity after all that, all as one "field" eg. PersonFinderField, to plop onto all your forms were a Person has to be specified, and use as a JTable cell editor, and similarly for every entity you have!
</ol>
<p>
Also "outstanding" but much less of a priority for me is "Hyper Beans," where i want to address describing a printable/viewable document using java code (rather than XML), in order to produce HTML, Excel and/or PDF output - using iText and Apache POI. And after that, ODF. This is for business "documents and reports" eg. invoices and such, and also the results of database queries and such, innit.
<p>
In the "Jelly Beans" series, i got so many things i want to do, i won't even start! OK, i'll list some of them quickly....
<ul>
<li> write about JPA (which i've eventually starting using in the past few weeks for a JEE/JSF/Seam web project)
<li> build a transactional REST server servlet backend framework for (my) Swing client applications
<li> implement a new experimental ORM, and using property "objects" rather than annotations, to enable native queries, ie. no strings attached, as in the previous blog entry
<li> implement an in-memory engine for the above, ala Prevayler </ul>
</ul>
<p>
<b><u>un-Java-ish Things to Do</u></b>
<p>
<ul>
<li>Visit friends and family in UK, Ireland, and Russia.
<li>Cycle from Dublin to Cork, via counties Wicklow (beautiful mountains), Carlow (visiting a friend), Laiose (my relatives). I might then cycle up the West Coast to Galway! I've done much of these routes on two earlier occassions, and want to do it again!
<li>Trek in the Annapurna in Nepal, and visit Tibet. 
<li>Cycle from South of France, over the Pyrennes, taking the French Way of St James, a traditional pilgrimage across Northern Spain. (Very overdue!)
</ul>
<p>
Now that my goals are set, i begin the task of trying to achieve them innit! But before i start, it's time for me to cycle around Cape Point, for the third time this week, it's nice! Which reminds me, my other blog is called <a href=http://ispin.iblog.co.za>"Getting Fit, Aiii"</a>. 
<p>
Because, yes it's true, i'm not really a Java professional. Actually right now, I'm trying desperately to break into the fitness instructing field - much less deadlines and zero stress - and you get to exercise while you work! 
<p>
The position i'm applying for (spinning instructor), requires you to "work" zero or otherwise 45 minutes a day, yeah baby, yeah! And you are encouraged to shout out things like "yeah baby yeah" at the top of your voice every minute or two, which is another perk! ;)
<p>
The other seven hours of the day... Actually I would like to be building a real Swing app for real people, using Netbeans 6.0, AppFramework (not aptframework), WebServices and/or JPA - so gimme a bell if you got simple requirements and plenty of bucks! 
 

]]>

</content>
</entry>
<entry>
<title>Trip and Tick: svnserve on linux et al</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/07/trip_and_tick_s.html" />
<modified>2008-02-13T10:17:33Z</modified>
<issued>2007-07-09T19:27:54Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.7814</id>
<created>2007-07-09T19:27:54Z</created>
<summary type="text/plain">Setting up and serving a subversion repository is easy. 
We create an svn user, configure svnserve in xinetd, and 
use svnadmin to create repositories.</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
<p>
I spotted this handy <a href='http://www.codeandcoffee.com/2007/06/22/how-to-setup-a-subversion-server-on-linux/'><u>blog entry</u></a>
and so decided to give it a go, on a brand new $15 linux VDS. Here are my notes, which 
are consequently a rehash of that blog. 
<p>
<p>
<!--name='_tt_useradd_svn__tt_'--><br><b><u><i><tt>useradd svn</tt></i></u></b>

<p>
Let's decide that <tt>svnserve</tt> will run as user <tt>svn</tt>, and access repositories off its home 
directory ie. <tt>/home/svn</tt>.
<p>
So we create the user <tt>svn</tt> with <tt>useradd</tt>, which creates its home directory <tt>/home/svn</tt>. 
<p>
<pre>
# useradd svn
</pre>
<p>
<!--name='_tt_svnadmin_create__tt_'--><br><b><u><i><tt>svnadmin create</tt></i></u></b>

<p>
We create repository using <tt>svnadmin</tt> eg. <tt>/home/svn/aptframework</tt>.
<p>
<pre>
# useradd svn
# su - svn
$ svnadmin create aptframework
</pre>
<p>
If this host is <tt>aptframework.net</tt>, then this repository's URL 
will be <tt>svn://aptframework.net/aptframework</tt>.
<p>
<p>
<!--name='_tt_vi_svnserve_conf__tt_'--><br><b><u><i><tt>vi svnserve.conf</tt></i></u></b>

<p>
In the <tt>svnserve.conf</tt> for our repository, we uncomment as follows.
<p>
<pre>
$ vi /home/svn/aptframework/conf/svnserve.conf
anon-access = read
auth-access = write
password-db = passwd
</pre>
<p>
We might want to have <tt>anon-access</tt> set to <tt>none</tt> eg. for private stuff. 
<p>
In the specified <tt>passwd-db</tt> file, 
we add usernames and passwords for ourselves.
<p>
<pre>
$ vi /home/svn/aptframework/conf/passwd
evanx = sshssh 
</pre>
<p>
If we want to use a common password file for multiple repositories eg. <tt>/home/svn/passwd</tt>, then...
<p>
<pre>
$ mv /home/svn/aptframework/conf/passwd /home/svn/passwd
$ vi /home/svn/aptframework/conf/svnserve.conf
password-db = /home/svn/passwd
</pre>
<p>
where we specify the absolute path for <tt>password-db</tt> in <tt>svnserve.conf</tt>. 
<p>
<p>
<!--name='_tt_xinetd__tt_'--><br><b><u><i><tt>xinetd</tt></i></u></b>

<p>
We add an <tt>svn</tt> config for <tt>xinetd</tt> in subdirectory <tt>/etc/xinetd.d/</tt> as follows
<p>
<pre>
# vi /etc/xinetd.d/svn
service svn {
  port = 3690
  socket_type = stream
  protocol = tcp
  wait = no
  user = svn
  server = /usr/bin/svnserve
  server_args = -i -r /home/svn
}
</pre>
<p>
where <tt>svnserve</tt> runs as user <tt>svn</tt>, and serves repositories off <tt>/home/svn</tt>.
<p>
We restart <tt>xinetd</tt> for the changes to take effect. 
<p>
<pre>
# /etc/init.d/xinetd restart
</pre>
<p>
<p>
<!--name='_tt_svn_checkout__tt_'--><br><b><u><i><tt>svn checkout</tt></i></u></b>

<p>
Now we can checkout a "working copy" of repository using <tt>svn://aptframework.net/aptframework</tt> URL.
<p>
Let's add and commit the standard (although optional) directories <tt>trunk</tt>, <tt>branches</tt> and
<tt>tags</tt>.
<p>
<pre>
# cd /tmp
# svn co svn://aptframework.net/aptframework aptframework --username evanx
# cd aptframework
# mkdir trunk
# mkdir branches
# mkdir tags
# svn add trunk
# svn add branches
# svn add tags
# svn commit -m "" --username evan
</pre>
<p>
<p>
<!--name='_tt_svn_import__tt_'--><br><b><u><i><tt>svn import</tt></i></u></b>

<p>
Finally we can import our source as follows, eg. from
<tt>/projects/aptframework/src</tt>.
<p>
<pre>
# cd /projects/aptframework
# svn import src svn://aptframework.net/aptframework/trunk/src -m "" --username evanx
</pre>
<p>
Or for the whole shebang, eg. <tt>src</tt>, <tt>lib</tt> and what-have-you...
<p>
<pre>
# cd /projects
# svn import aptframework svn://aptframework.net/aptframework/trunk -m "" --username evanx
</pre>
<p>
We can do a test checkout to a <tt>tmp</tt> directory to make sure it looks ok, eg. 
we checkout just the <tt>src</tt> directory as follows.
<p>
<pre>
# svn co svn://aptframework.net/aptframework/trunk/src /tmp/aptframework-src --username evanx
</pre>
<p>
<p>
<!--name='and_again'--><br><b><u><i>And again</i></u></b>

<p>
When things don't go as planned, we just recreate the repository from scratch as follows. 
<p>
<pre>
# su - svn
$ rm -rf aptframework
$ svnadmin create aptframework
$ vi aptframework/conf/svnserve.conf
$ vi aptframework/conf/passwd
</pre>
<p>
To re-import source, we'll need to search and destroy all those <tt>.svn</tt> hidden directories 
eg. in our <tt>src</tt>, innit.
<p>
<p>
<!--name='conclusion'--><br><b><u><i>Conclusion</i></u></b>

<p>
Setting up and serving a subversion repository is quite trivial. 
We create an <tt>svn</tt> user, configure <tt>svnserve</tt> in <tt>xinetd</tt>, and 
use <tt>svnadmin</tt> to create repositories. 
<p>
<p>
]]>

</content>
</entry>
<entry>
<title>A Short Note About Properties And Politics</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/evanx/archive/2007/07/a_short_note_ab.html" />
<modified>2008-02-13T10:16:34Z</modified>
<issued>2007-07-07T17:13:51Z</issued>
<id>tag:weblogs.java.net,2007:/blog/evanx/253.7809</id>
<created>2007-07-07T17:13:51Z</created>
<summary type="text/plain">Another reason why we need properties in the language..</summary>
<author>
<name>evanx</name>

<email>evan@precis.org.za</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/evanx/">
<![CDATA[<p>
Another reason why we need properties in the language is ... for "native" database queries, eg. 
<p>
<pre>
Person warMonger = createQuery(new WhereLikePredicate(Person.name, "G.W. Bush"));
</pre>
<p>
where <tt>Person.name</tt> is a property, ie. <tt>Person.class</tt> has an accessor <tt>getName()</tt>. 
<p>
In this case, our JPA queries are refactorable, yippee! If you have a real query, it's more obvious (no offense), eg.
<p>
<pre>
      SelectQuery query = createSelectQuery();
      query.setTitle("Fido's in region %s", regionId);
      query.selectAll(dog);
      query.selectExclude(dog.address);
      query.select(organisation.organisationId, organisation.organisationName);
      query.join(dog, organisation, region);
      query.whereEquals(region.regionId, regionId); 
      query.whereStartsWithIgnoreCase(dog.dogName, "fido"); 
      query.whereIsNotNull(organisation.organisationName); 
      query.whereIs(organisation.active, true); 
      query.orderBy(organisation.organisationId, dog.dogName); 
      query.limit(100); 
</pre>
<p>
as presented in the <a href='https://aptframework.dev.java.net/article/aptMeme.html'>SQL Objects</a>
precursor to the <a href='http://aptframework.dev.java.net/jelly/contents.html'>Jelly Bean</a> series. 
<p>
Having JPA queries in strings (and any references in strings) is something that i hope people cannot tolerate going forward!? ;) 


<br>

<table>
<tr><td>
  <form action="http://weblogs.java.net/blog/evanx/archive/2007/06/entity_equals_1.html"> 
    <a href="http://weblogs.java.net/blog/evanx/archive/2007/06/entity_equals_1.html" 
      style="text-decoration: none;"><input type=submit value="Discuss" /></a>
  </form>
<td>
    <form action='https://feedtrove.dev.java.net'>
    <a href='https://feedtrove.dev.java.net'
      style="text-decoration: none;"><input type=submit value='FeedTrove'/></a>
  </form>
<td>
  <form action='http://aptframework.dev.java.net/jelly/contents.html'>
    <a href='http://aptframework.dev.java.net/jelly/contents.html'
      style="text-decoration: none;"><input type=submit value='Jelly Contents'/></a>
  </form>
<td>
  <form action='http://aptframework.dev.java.net/foundation/contents.html'>
    <a href='http://aptframework.dev.java.net/foundation/contents.html'
      style="text-decoration: none;"><input type=submit value='Foundation Trilogy'/></a>
  </form>
</table>

]]>

</content>
</entry>

</feed>