Wish I'd had this a few years back: Best practices for using the Java Native Interface.
Might have saved me some grief.
transentia's old content; click on the logo to return to the new content
transentia pty. ltd.; development, consulting, training at the leading-edge of technology
Wish I'd had this a few years back: Best practices for using the Java Native Interface.
Might have saved me some grief.
My spidey-sense tells me that this is potentially important:
Hi all,
I'm pleased to announce the release of Gaelyk, a lightweight Groovy
toolkit for Google App Engine:
http://gaelyk.appspot.com/Gaelyk builds upon the Groovy templates and Groovlets, adding some
additional hooks into Google App Engine SDK APIs thanks to new
variables in the binding and with a Groovy category.
Gaelyk is mainly intended for small apps, as Grails is a better fit
for bigger projects, but for quick little apps where you don't need
the full power and conventions of Grails, Gaelyk can be used.
You can learn more about Gaelyk by visiting the website, and reading
the tutorial: http://gaelyk.appspot.com/tutorial/Enjoy!
-
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSourcehttp://www.springsource.com/g2one
I looked at it and straight-away thought: "At last. Something for the PHP/GCI people!"
Gaelyk offers little or no ceremony and little or no scary sophistication. Plain Good Stuff with the extra cachet of Google AppEngine thrown in for good measure.
Hopefully, it will be a great "gateway drug" to get people into Grails.
This is really delivering on the potential of Groovy!
Congratulations, Guillaume and Marcel.
I prepared this recently for a local organization. May as well share and enjoy:
Bob Brown
Position
Principal, Director and Owner of Transentia Pty. Ltd.
Company
Transentia Pty. Ltd.
http://www.transentia.com.au
Brief background of yourself / company
Bob Brown has 25 years experience as a software developer and also possesses more than 10 years experience in tertiary-level research and lecturing in Europe, Asia and Australia. Bob has been a frequent presenter at conferences and
public events throughout the world.
Transentia has been in existence since late 1999 and operates under the byline "training, development, consulting at the leading-edge of technology."
Transentia's direct client list includes:
Transentia has also subcontracted on behalf of many other companies to many other large Australian organisations.
Specialities / Special interests
Bob Brown is a specialist in Enterprise-level Java Development, covering:
Bob also has strong C development experience in embedded/SCADA environments.
Bob has extensive Unix/Linux experience.
Bob has varied experience as technical project team lead and is a Certified Scrum Master (http://www.scrumalli … iles/45966-bob-brown).
In 1998, Bob was the recipient of an IBM 'residency' and was sponsored to work at IBM's Austin, Texas, research centre on Java design, programming and optimisation for the Network Computer. This work has been published as a Prentice-Hall book entitled "JAVA Thin-Client Programming for a Network Computing Environment." In April 2000, he was asked to return to IBM for a second residency entitled "Connecting e-business to the enterprise." This residency concentrated on using IBM's Pattern Development Kit to integrate IBM's WebSphere Application Server, VisualAge for Java, CICS, IMS and MQSeries into an Internet-based e-business enterprise.
Bob holds an M.Sc. from the University of Essex, England and a B.Sc. from The Hatfield Polytechnic, England.
From the humour page of the June-July edition of the Business Trader Magazine's website:
As the person who brought this to my attention (thanks Janet!) said: Is there a profound economic phenomenon lying within?
It wouldn't surprise me to find that the people who brought us the various "stimulus packages" read this before coming up with their brilliant ideas…
Nice to know where my industry stands.
I remember being told years ago that while the boot making industry has an ANZSIC code (2250), the ICT industry does not.
Given that even boot manufacturing would depend on ICT's ministrations, this is rather sad…
That is if the industry even still exists in Australia…my home city in the UK was once renowned for its shoemaking; there are none left today, excepting that the soccer team are called 'The Cobblers.'
Yesterday, I attended this event: similar to CITCON but with a wider "anything goes" feel.
My thanks to everybody who attended and especially to those who presented, I learned some Good Stuff.
Good Stuff like:
Most of this stuff is outside my normal sphere of influence, so this was a truly mind-opening experience :-)
I did a couple of informal stand-ups about Grails. Shame that I didn't have a projector (or rather, that I had a digital PC port and only an Analog projector cable available)…made it rather hard to show code.
No twitter for me, but I do have an equally inane piccy or two:
There's lots more 'stuff' out there, search for #barcampbne.
Dealing with reference data…the predominantly static data that populates drop-down lists, and so on…always causes wasted brain cycles: for ease of maintenance, we don't want the values embedded in the code, but we nonetheless do want it centralized.
The Spring underpinnings of Grails (and the way that Grails 'surfaces' these underpinnings) can offer one solution and help reserve those brain cycles for more deep thoughts.
Here's a typical example of reference data; the drop-down select car and things lists in this trivial GSP:
<%@ page contentType="text/html;charset=UTF-8" %> <html> <head><title>Reference Data Demo</title></head> <body> <h1>Tell me about yourself</h1> <table cellpadding="10" cellspacing="2" border="0"> <tr> <td><label for="car">Select your preferred car:</label> <td><g:select name="car" optionKey="key" optionValue="value" from="${cars.entrySet()}" /> <tr> <td><label for="things">Select your preferred things:</label> <td><g:select name="things" optionKey="key" from="${things.entrySet()}" valueMessagePrefix='things' /> </table> </body> </html>
<aside>
Something I learned recently and show above: for HTML: "The TR or table row element requires a start tag, but the end tag can always be left out." I always assumed that these 'container'
tags had to have both start and end tags. Be warned, however: although a handy shortcut, this creates a document that will not be legal XHTML [which is always best aimed for]. Thus, this falls
into the set of "useful tricks and tips that are best ignored for one's own sanity." Other members of the set include PERL, and the tactics that could be used for winning an argument against my wife…
</aside>
The above GSP showed how to use the reference data but how is it declared? I simply declared the following in Grails' conf/resources.groovy file:
beans = { cars(java.util.HashMap, [slow: 'Toyota Avalon', fast: 'Bugatti Veyron']) }
A more traditional 'Springy' approach is also possible via conf/resources.xml:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd"> <util:map id="things"> <entry key="good" value="good"/> <entry key="bad" value="bad" /> </util:map> </beans>
Both configuration options can be (and are, in this example) used together.
In both of the above cases, the data is now centralized and separated from the body of the code. Both Good Things.
The second <g:select> shows how to internationalize this feature.
In this case, the value in the things map is used (in conjunction with the valueMessagePrefix attribute value) as a key into the 'messages' resource bundle under grails-app/i18n.
For this example, the bundle contains entries such as:
things.good=My Cat things.bad=The Flu
Sadly, there is a bit of a bug here. It does not currently (Grails 1.2-M1 and below, at least) appear possible to use both valueMessagePrefix and optionValue attributes. In this case I have been been lucky and have been able to get away with omitting the optionValue attribute (but the optionKey attribute is still required):
<g:select name="things" optionKey="key" from="${things.entrySet()}" valueMessagePrefix='things' />
In other situations (with collections of other bean classes), one may not be so lucky.
My AUD$0.02 worth on the bug is attached to: http://jira.codehaus … g/browse/GRAILS-3961.
For completeness (its pretty trivial) here's the controller code:
class ThingController { def cars def things def index = { redirect(action: view) } def view = { [cars: cars, things: things] } }
Notice the way the two Reference Data Maps are injected into the controller and then pased into the view as its model…clean and simple.
It is possible to do the same sort of thing with filters. This can be useful for showing build numbers, etc. on page headers/footers.
Here's what it all looks like pulled together (pretty ordinary, but that isn't the point):
Now. Stop wasting brain cycles on JNDI entries/Properties files/Database entries/Quartz timers/… and get on with more important things.
I'm using the latest snapshots of Opera 10 more and more…and enjoying it!
YMMV.
Microsoft: start worrying.
This time Coping with Bugs on an Agile/Scrum Project.
One comment that that resonated with me stressed how important it is to characterize changes differently from actual bugs. Having the Product Owner tell you "We forgot about X" does not actually mean that a bug has crawled into the system.
A useful blog series: http://blog.xebia.co … ementation-patterns/.
I'm sure that this will be useful sometime in the future.