19
May
2009

Do you use CSS reset files ?

Any browser comes with its own implemented method for displaying non-css setted html pages, but they have their own set of styles, sometimes regardless of the W3C recommandation, and so often different between them.

Nowadays, the trends are to use reset css files to make your style identical for any browser, without breaking your head on the wall.

The most commonly used CSS Reset are :

But you, do you use a CSS Reset method or file ? Do you use your own ?

Leave your though, I'll be pleased to discuss with you about that ! :)

03
Feb
2009

Why the form validation are in the View part ?

The question is quite clear and I'm going to explain my point of view.

If you take a look at Struts or JSF,and I'm sure, for a lots of others frameworks out there, the form verification are made in the View side.

For example, this is a wrong method (IMHO) used by JSF templates :


<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
   <h:form>
      <h:outputText value="Name: "/>
         <h:inputText id="name" required="true" maxlength="20" value="#{user.name}">
            <f:validateLength minimum="3" maximum="20"/>
         </h:inputText>
         <h:message for="name" style="color: red"/>
         <h:commandButton value="Submit" action="success"/>
      <h:form>
</f:view>

The point I want to raise is the fact that it's generally the job of the web designer to make the template, the forms, but NOT to make the verifications !

Yes he need to know which value is needed, eventually which type is waited (for implementing nice date picker for example), but not to test if the string is too short or too long, if it's an email, etc.

The side that must handle this kind of operation must be the Controller, that know which type a field must be. Eventually, the Model side can impose its structure to the controller, but never the View side ! A webdesigner must never impose the structure of the data. Right ?

Ok now everyone is boiling about what javascript is able to, and I totally agree with that, but with restrictions.

Client-side verifications must be implemented only to improve user experience. Never forget that javascript can be disabled !

But it's a great idea to tell at your webdesigner the constraints for the form in the fact that he could implement a client-side verification, and then, your controller will do the server-side (final) verification, in case javascript is disabled, or some bad guy try to play with your code :p

I would be pleased to know your opinion about that :)

21
Jul
2008

How to install DBDesigner 4

Hey !

Today I will explain how to install dbdesigner4 on Fedora. It's a bit tricky ! :/

So first of all, download these two files :

After, extract dbdesigner (tar -xvzf DBDesigner4.0.5.4.tar.gz).

Extract also kylixlibs3-borqt-3.0-2.tar.gz.

Go to the kylixlibs3-borqt folder, and do this :


tar -xvzf DBDesigner4.0.5.4.tar.gz
tar -xvzf kylixlibs3-borqt-3.0-2.tar.gz
cd kylixlibs3-borqt
su -
cp libborqt-6.9.0-qt2.3.so /usr/lib/libborqt-6.9.0-qt2.3.so
ln -s /usr/lib/libborqt-6.9.0-qt2.3.so /lib/libborqt-6.9-qt2.3.so
/sbin/ldconfig
chown -R user:user ../DBDesigner4
cd ../DBDesigner4/
./startdbd

And thats it ! :)

But now, you want to connect DBDesigner to your database to automatically manage your table from your design ! And apparently It doesn't work !

Okay, okay, I give you the solution !

Donwload this file :
http://www.devart.com/dbx/download.html (the right for you, sure !)

Extract it and copy it to /usr/lib :


tar -xvzf dbxmda.tar.gz
su -
cd DbxMda
mv libsqlmda.so.4.20 /usr/lib/

Then, open DBDesigner, go to Database > Connect to Database, click on "New connection Database", choose the "advance" tab, and modify these informations :

LibraryName: libsqlmda.so.4.60
VendorLib: libmysqlclient.so.10.0.0
GetDriverFunc: getSQLDriverMySQL

BE CAREFUL ! The current value for GetDriverFunc is NOT the same as the one indicated here ! Yep ! The Y is in upper caps but mine is in lower caps. It's a big difference because in the libsqlmda.so, the function is getSQLDriverMySQL and NOT getSQLDriverMYSQL, so if you leave the Y, it will not work ! :p

Now you can play with mysql ^^

01
Jul
2008

Error c00ce56e

Impossible d'effectuer l'opération à cause de l'erreur suivante c00ce56e.
Could not complete the operation due to error c00ce56e

This problem occur on IE7 when you send an xhr request with a json-comment-filtered response.

The problem is that IE7 does not manage this file type.

To avoid this problem, just remove the


header ('Content-Type: text/json-comment-filtered');

From your Php file (or something like that in other languages files (asp, cfm, etc)) and you will normally not have this problem.

27
Jun
2008

Problem of JVM with Eclipse Ganymede

It appear that the JVM (under Linux apparently (I've only tested on it)) has some problems that makes Eclipse crash a lots of time (just by saving a file, for example).
It's very boring.

I've found a solution to avoid this problem, just edit the eclipse.ini file and add this line :

-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>

Normally, your problem is now away ! :)