AAARGH BASE!

By Apache on Wednesday 29 September 2010 23:31 - Comments (6)
Categories: Life, Work, Views: 3.813

Ik heb al enkele blogs voorbij zien komen die de wanpraktijken bij dienstenverleners als ISP's of Telecoms aanklagen ... zelf had ik ook al een tijdje problemen want ik probeer al sinds april (!) mijn Base abonnement van mijn privé op de firma te krijgen.

Base is de Belgische tak van KPN, trouwens, ik ben al lang klant, ze zijn goedkoop en redelijk betrouwbaar qua bereik.

Na 3x alle papieren opnieuw te hebben bezorgd en 5 maal
informatie los te krijgen bij de base shop + 2x telefonisch contact met base was het EINDELIJK gelukt om het op naam van de firma te krijgen.

Ik had origineel de optie op een data abonnement van 500mb, die is nu verdwenen en in ruil heb ik een blackberry data abbo van 10MB (WTF ...) en blijkbaar betaal ik nu per mb voor mijn dataverkeer wat dus potentieel een dure grap word! (hoewel ik niet van plan ben te betalen)

Nu kan ik hier morgen weer achteraan (mijn 6e trip langs de base winkel) en mijn kookpunt is bijna bereikt ... als na morgen niet alles in orde is stap ik gewoon naar een advocaat en laat hem het verder afhandelen:

Het grappige is, ik wilde dus een business account, base klaagde een tijdje geleden nog dat ze niet genoeg business klanten hadden omdat proximus oneerlijke praktijken zal hanteren.
Na mijn ervaring is het duidelijk, base administratie draait gewoon zo vierkant dat je er niet op kan rekenen, dan verbaast het mij niets dat ze geen klanten kunnen krijgen.

Waarom is het toch zo moeilijk om als je iets groter word om toch gewoon naar je klanten te luisteren en hun voort te helpen in plaats van door te verwijzen naar abstracte zaken als "het hoofdkwartier" en "procedures", een service moet een blackbox zijn waar je een goed resultaat uit krijgt, geen excuses en eindeloze reeks van incompetente acties die tot frustraties leiden!

(Als base hier één potentiële klant door verliest beschouw ik dat als dat ik die persoon veel leed heb kunnen besparen)

[Update]
Ik ben net via betrouwbare bron te weten gekomen dat Base in april overgestapt is op een nieuw IT systeem voor CRM ... blijkbaar verloopt alles sinds dan wat minder vlot ... Aangezien ik zelf in die sector zit en al bij enkele telecom bedrijven heb gewerkt in Belgie als software ontwikkelaar kan ik tot een zekere hoogte nog wel begrip opbrengen, maar op 6 maanden mogen de kinderziektes toch wel uit het systeem zijn.

Walks like a duck, talks like a duck

By Apache on Sunday 30 May 2010 23:20 - Comments (3)
Categories: Flex, Geekstuff, Work, Views: 12.364

Some of you may already be familiar with duck typing from other languages like groovy.

If not you can ready about it here: http://en.wikipedia.org/wiki/Duck_typing

Anyway, I was working on a presentation, and in my example I was selecting Product-objects. And I didn't want to immediatly create InvoiceItems because 1) I didn't have an invoice object yet 2) it would require a really complex structure where I'm selecting Products and then when it's selected and/or the amount goes above 0 convert it to a different type of object and have the item renderer deal with it ... again complex solutions.

Then I remembered an idea I had on friday for an extension of the datagrid control without having to invasively extend the object to support certain action you want your custom component to have, like checkbox selection, custom background color for a row, etc

What I came up with was using the ObjectProxy class to wrap a real domain object but next to it takes any property you set on it. So you can store whatever ui state data on the object that behaves exactly like the business object, also when iterating over all the object properties or serializing the object.

I know you can just declare a class dynamic in actionscript, but this isn't what you want on a real domain object, it has fixed properties and you usually want to persist it in the end.

Little example how it looks

XML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<s:List width="100%" height="100%" allowMultipleSelection="true">
        <s:dataProvider>
            <util:DynamicElementArrayList origSource="{AppModel.products}" id="dynList" />
        </s:dataProvider>
        <s:itemRenderer>
            <fx:Component>
                <s:ItemRenderer>
                    <s:HGroup width="100%" height="25" verticalAlign="middle" doubleClickEnabled="true" doubleClick="data.amount++">
                        <s:CheckBox selected="@{data.selected}" /> 
                        <s:Label text="{data.name}" /><mx:Spacer width="100%" /><s:Label text="{data.price}" />
                        <s:ComboBox selectedItem="@{data.amount}" requireSelection="true">
                            <s:ArrayCollection>
                                <fx:Array>
                                    <fx:Number>1</fx:Number>
                                    <fx:Number>2</fx:Number>
                                    <fx:Number>3</fx:Number>
                                    <fx:Number>4</fx:Number>
                                    <fx:Number>5</fx:Number>
                                </fx:Array>
                            </s:ArrayCollection>
                        </s:ComboBox>
                    </s:HGroup>
                </s:ItemRenderer>
            </fx:Component>
        </s:itemRenderer>
    </s:List>



The dynamicElementArrayList will just wrap each object inside a DynamicElement class.

And the core of the DynamicElement are these 2 simple overrides:

Flash ActionScript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
flash_proxy override function getProperty(name:*):* {
            if (wrappedObject.hasOwnProperty(name))
            {
                return super.getProperty(name);
            } else {
                return dynamicProperties[name];
            }
        }
        
        flash_proxy override function setProperty(name:*, value:*):void {
            var oldValue: *;
            if (wrappedObject.hasOwnProperty(name))
            {
                oldValue = wrappedObject[name]; 
                super.setProperty(name, value);
            } else {
                oldValue = dynamicProperties[name];
                dynamicProperties[name] = value;
            }
            
            // binding
            this.dispatchEvent(new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE, false, false, null, this, oldValue, value, this));
        }



Similar things can be done in php using __get() and __set(), and probably in other languages as well.

In the end it allows me to have this screen backed by regular old domain objects, but I can also get/set the metadata I need for the ui, without having to create new classes every time.

http://tweakers.net/ext/f/0R7pI6hMfL8tuLPEAOxB2wqo/full.png

can be handled as, where obj.selected and obj.amount are not on the original object, and the ObjectUtil.toString does not show the new dynamic properties and also identifies the object class as the original domain class.

Flash ActionScript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
for each (var obj: Object in dynList)
                {
                    trace("----------------------------");
                    if (obj.selected)
                    {
                        trace(ObjectUtil.toString(obj));
                        trace("amount: " + obj.amount);
                    }
                    else
                    {
                        trace("not selected:");
                        trace(ObjectUtil.toString(obj));
                    }
                    
                }



http://codecaster.nl/got/rmb/star1.gifhttp://codecaster.nl/got/rmb/star2.gifhttp://codecaster.nl/got/rmb/star3.gifhttp://codecaster.nl/got/rmb/star4.gifhttp://codecaster.nl/got/rmb/star5.gifhttp://codecaster.nl/got/rmb/stats.gif

My trip down the rabbit hole

By Apache on Wednesday 31 March 2010 22:58 - Comments are closed
Categories: Flex, Geekstuff, Java, Life, Work, Views: 2.684

Hello everybody,

Since what you can read below is merely meta-data about how I arrived at the subject of my blog. It probably won't be very interesting, except if you want some background info on how I ended up being a flex-guy. Feel free to skip ahead to my next blogpost immediately.
Introduction
Since this is my first blogpost on tweakblogs and my previous blog has been at least 5 years ago, I used to blog about php/css/js and how they related to a little hobby project I had back in the days. Other than just an introduction it will help you understand where I am coming from and how I ended up here, writing about something called "flex". And with the release of flex 4 the timing seems right to highlight some of the features.
The first steps
Almost 10 years ago, inspired by reading /14 on got, I started messing about with PHP to have some dynamic content on my website. Then at school we had to build a project so I decided to do what everybody was doing at that time, I built my own forum-software. That inspired a me to develop a silly little framework, the big hype back then was templating engines to seperate layout from business logic. This was already better than echo'n code in php, but it still wasn't component based, so a good friend and co-developer Yannick Houbrix and I did some experiments on mixing components and templates.

With limited results such as these.

http://tweakers.net/ext/f/Inp9qJNKOdIjEUp0TM2bQvmK/full.jpg

http://tweakers.net/ext/f/IgjJlnC6pfU20HGMA1LfgYr0/full.jpg


What I had learned so far:
  • PHP was not without flaws
  • Most of the frameworks available for PHP were immature at that time
  • Everybody wanted to invent his version of the wheel
  • Using html, & javascript to write "components" is painful
  • Just reloading to see your result is fun, quick and keeps you "agile"
School: time for experimenting
At school we started with some other languages, pascal, C, vb6, cobol, etc but later the focus shifted more towards java and it's frameworks like swing, jdbc, hibernate, spring, .. I remember that we got lucky with that one because spring was really becoming popular in those days.

For my internship the same friend as I worked on the php framework with and I, got a great chance to develop an eclipse RCP application, and it was my first experience with real use-cases and the UI's and custom components they require. I really like the SWT/JFace combination. It worked more intuitive than the swing TableModel (try setting a default column width) and overall it was pretty painless even though everything was new to us (and we had nobody to guide us during development since they had no in-house java-devs).


http://tweakers.net/ext/f/371vFq9PcfaV0QUpFh3t55T0/full.png

http://tweakers.net/ext/f/qrZuNA7rH3giqiSrDPo7llJc/full.png


Again some valuable conclusions for myself.
  • Java is what I want, has more language features that I was missing before
  • There are some really nice mature frameworks based on nice ideas (object relational mapping, dependency injection, etc)
  • Building UI's and custom components is actually kinda fun
  • SWT/JFace had nice UI concepts such as data providers, label providers, ... they form a nice layer between the ui and the domain
  • Deployment/updates are easier to deploy on the web
I think you can conclude that I like to try new technologies, new frameworks, it's my passion. But since there is more demand for webapps than client apps on the professional market I went looking my dream stack.
Starting as a "consultant" & "The Dream Stack"
On the server-side I was already pretty hooked on java/spring/hibernate, although it doesn't need to be spring or hibernate specifically, but the basics I want is an orm and a di framework (other frameworks are added if the requirements warrant them). The ui technology was more difficult. I did some JSF@school but that definitely couldn't convince me, we mostly blamed the "young" age of the technology, it was the apache myfaces first release, but as time would tell it didn't change much.

I started a project where I was trusted with picking the stack so I gave GWT a try, and I have to say, the basic idea is fine, gmail was already there and many developers where dreaming of creating ajax apps as nice as gmail. But when I started looking for some components what I basically found were wrappers around existing html/javascript/css components, I know that now there are more native GWT components but at that time, it was a bit disappointing but already better than doing things manually.

And then when I started at my first "real" job as a java consultant, I was lucky enough to come into contact with a great flex-developer, and they actually gave me a chance to play around with flex and before I knew it I was working on a Java/spring/jpa/flex3 project (using graniteds as a remoting solution, but more on that in a later blogpost)
What to expect?
And this is where my next post will start, explaining in detail some of the strong points of flex, that imho make it stand out from other UI frameworks. I am sure there will be room for discussions like "flex vs html5" and "the flashplayer is a tool of satan". I have already converted some colleagues to using flex, and I have many others asking me for a tutorial in flex, or some extra explanation, and this is one of the major reasons of starting this blog. Not that there aren't plenty of good flex resources already, but I as soon as I get passed the basics in the first 3-4 posts, so I can refer to my earlier posts with more advanced themes like remoting (and the implications that arise when using orm/proxies/lazy-loading), some common ui usecases, some example apps and hopefully you readers will supply me with some questions/point of views that I can write about. , I will go on to the nice and funky stuff that isn't so obvious :)

And it doesn't have to be "just flex", sometimes I have funny stories about my life as well.

Btw: the reason why I chose have an English blog, I work in Brussels and I have some nice French speaking colleagues, so this is a nice compromise ;)

http://codecaster.nl/got/rmb/star1.gifhttp://codecaster.nl/got/rmb/star2.gifhttp://codecaster.nl/got/rmb/star3.gifhttp://codecaster.nl/got/rmb/star4.gifhttp://codecaster.nl/got/rmb/star5.gifhttp://codecaster.nl/got/rmb/stats.gif