vendredi 16 novembre 2012

Host your website pages on GitHub

Héberger vos pages web (static) sur GitHub
Quelques étapes pour héberger votre contenu web sur GitHub. Prenons notre exemple, Qalingo.com

1) Nous avons créé notre organisation sur GitHub: Qalingo

2) Nous créons notre projet, et le transférons vers l'organisation. Le projet associé doit être absolument de type yourName.github.com : qalingo.github.com

3) Règles DNS pour notre nom de domaine : qalingo.com

Par habitude, nous créons 4 redirections utiles:
qalingo.com vers www.qalingo.com
w.qalingo.com vers www.qalingo.com
ww.qalingo.com vers www.qalingo.com
wwww.qalingo.com vers www.qalingo.com
Puis 2 lignes de règles DNS
qalingo.github.com 10800 IN A 204.232.175.78
www 10800 IN CNAME qalingo.github.com.
Attendre que les règles soient diffusées.
Vous pouvez tester de temps en temps par la commande :
host -t a domainName
Soit pour nous
host -t a www.qalingo.com
qui dans notre exemple doit afficher :
www.qalingo.com is an alias for qalingo.github.com.
qalingo.github.com has address 204.232.175.78
Il ne vous reste plus qu'à déposer votre projet web static sur votre repos GitHub (clone, add, commit, push, ...).

Enjoy.
Host your (static) website pages on GitHub
Few steps to host your web content on GitHub. Consider our example, Qalingo.com

1) We have create our organization on GitHub: Qalingo

2) We create our project, and transfer to the organization. The project name must be absolutely like yourName.github.com: qalingo.github.com

3) Rules for our DNS domain name: qalingo.com

As many times, we create four helpful redirects:
qalingo.com vers www.qalingo.com
w.qalingo.com vers www.qalingo.com
ww.qalingo.com vers www.qalingo.com
wwww.qalingo.com vers www.qalingo.com
Then 2 lines of DNS rules
qalingo.github.com 10800 IN A 204.232.175.78
www 10800 IN CNAME qalingo.github.com.
Wait until the rules are diffused.
Some time, you can test with the command
host -t a domainName
in our case, looks like
host -t a www.qalingo.com
which in our example will display:
www.qalingo.com is an alias for qalingo.github.com.
qalingo.github.com has address 204.232.175.78
Just drop your static web project on your rest GitHub (clone, add, commit, push, ...).

Enjoy.

lundi 5 novembre 2012

Qalingo: Opensource Java eCommerce draft

Opensource Java eCommerce (POC version, Qalingo)
Opensource Java eCommerce (POC version, Qalingo)
Après une longue expérience sur un eCommerce pour une marque française, j'ai souhaité démarrer un projet opensource Java par opposition aux nombreux projets PHP trop plébiscités à mon goût et malgré la présence d'initiatives très respectables comme Broadleaf Commerce, JadaSite, Shopizer ou KonaKart.

Je partage donc une première version écrite ces dernières semaines. Cette étape permettra de prendre du recul et d'en discuter.
Cette version est un Proof Of Concept, où je n'ai rien optimisé, la cible étant d'écrire un premier jet rapide.
Les puristes s'agaçeront sur bien des couches et je m'en excuse, c'est un draft ;)

Le repository est sur GitHub : GitHub Qalingo
La Licence opensource est à définir, actuellement en Apache License Version 2.0 (le monde des licences opensource est bien compliqué)

Ce projet se présente comme une boite à outils composée de modules Maven :

Qalingo : B2C Engine

- qalingo-apis : Les APIs Core qui composeront le moteur eCommerce
- qalingo-misc : Les modules tiers pour import/export, SQL, traductions

*Qalingo : B2C Engine on GitHub

Qalingo : B2C Web Batch Synchronization

qalingo-qalingo-webapp-applications : Les applications tiers type Spring-Batch dédiées à synchroniser le eCommerce vers le CRM/CMS/ERP etc...

*Qalingo : B2C Web Batch Synchronization on GitHub

Qalingo : B2C Web classic Frontoffice & Backoffice

- qalingo-theme-assets : Les ressources type "page" et js/css/img etc...
- qalingo-webapp-backoffices : Les backs, divisés en 3 : "business", "reporting", "technical"
- qalingo-webapp-frontoffices : Les fronts "prehome", "mcommerce"

*Qalingo : B2C Web classic Frontoffice & Backoffice on GitHub

Qalingo : B2C Web Remote

- qalingo-webapp-remotes : Les fronts "remote" Rest/Webservices (pour les Apps mobile)

*Qalingo : B2C Web Remote on GitHub

D'un point de vue métier, la cible de ce premier jet :
  • Gestion d'un catalogue customisable par marché. Il y a donc une definition sur 3 niveaux d'objets pour s'adapter à une marque qui aurait un catalogue monde, une surcharge par marché, avec une ensemble de traductions pour chacun de ces marchés (MarketPlace>Market>MarketArea>Localization).
  • Gestion des thèmes par marché et par device via le filtre de l'API Wurlf
  • URLs réécrites
  • Sécurité via Spring-security
  • Simple gestion des cutomers
  • Gestion d'attributs complémentaires pour les objets Customer/ProductCategory/ProductMarketing/ProductSku/PaymentGateway/Store
  • Simple Tunnel d'achat
  • Wishlist customer
  • Gestion de régles métier Via Drools
  • Gestion de la recherche via SOLR
  • Génération des traductions depuis une feuille Excel dédiée aux équipes métier
  • Pré Home dédiée à la redirection vers les n marchés
  • OpenStreetMap pour la liste des points de vente
Votre support, votre aide, vos critiques, remarques, conseils seront les bienvenus.

Prochaine étapes, mettre en place une alpha début décembre, une beta début 2013, une 1.0 printemps 2013 (suivant les retours) :
  • Nettoyer le code
  • Optimiser le code
  • Ecrire les test unitaires
  • Definir tous les types d'Exception et les logs associés
  • Conception des backoffices.
  • Conception du "remote" Rest pour les apps mobile
  • Brancher le eCommerce vers un CMS de type Alfresco via la norme CMIS (open CMIS) pour synchroniser en Rest les deux environnements
  • Ecriture des règles Drools
  • Réflexion sur les "bundles"
  • Réflexion sur les "changesets"
  • Exports/Imports ?
  • Réflexion pour permettre des "hooks/plugins" autrement qu'en surchargeant les beans Spring
  • portlet Liferay connecté sur la webapp "remote" Rest ?
  • Une longue liste de chose à faire, même pour un simple ecommerce...

La stack actuelle des frameworks :

Spring 3.1.2.RELEASE
Hibernate 4.1.7.Final
ehcache 2.6.0
Velocity 1.7
JQuery 1.7.2
Spring-Batch 2.1.9.RELEASE
Spring-WS 2.1.0.RELEASE
Spring-Security 3.1.2.RELEASE
Boostrap 2.2.1
Wurlf/ScientiaMobile 1.4.2
SOLR 4.0.0-BETA
DROOLS 5.4.0.Final
logback 1.0.6

Les outils :

Maven 3.0
MySql (server) 5.1.51
MySql (driver) 5.1.9
Apache-tomcat 7.0.22
Apache 2.2
Java 1.6.0_22

Malgré le fait que j'apprécie beaucoup ce framework, j'ai abandonné Vaadin, pour ne pas avoir trop de frameworks différents. De ce fait les backoffices sont en velocity avec un theme Bootstrap/Font Awesome comme les frontoffices.

Je vais continuer de commiter, et publier en parallèle sur le blog des zooms sur chaques parties.

To Be Continued...
Opensource Java eCommerce (POC version, Qalingo)
After a long experience on an eCommerce for a French brand, I wanted to start an opensource project Java despite the presence of very respectable initiatives as Broadleaf Commerce, JadaSite, or Shopizer KonaKart and versus PHP projectsversus PHP projects (too acclaimed for my taste).

I share a first version written in recent weeks. This step will be the good time to get feedback and discuss.
This version is a proof of concept, where nothing is realy optimized. The target was to write a first draft quickly.
The purists will be warm concerning many layers and i'm sorry, this is a draft;)

The repository is on GitHub: GitHub Qalingo
The License opensource is to define, current version is on Apache License Version 2.0 (the world of open source licenses is realy complicated)

This project looks like a toolbox consisting of modules Maven:

Qalingo : B2C Engine

- qalingo-apis : The Core APIs that make up the engine eCommerce
- qalingo-misc : The third party modules for import / export, SQL translations

*Qalingo : B2C Engine on GitHub

Qalingo : B2C Web Batch Synchronization

qalingo-qalingo-webapp-applications : Applications such third-Spring Batch dedicated to eCommerce to synchronize CRM / CMS / ERP etc...

*Qalingo : B2C Web Batch Synchronization on GitHub

Qalingo : B2C Web classic Frontoffice & Backoffice

- qalingo-theme-assets : resources type "page" and js / css / img etc...
- qalingo-webapp-backoffices : The backs were divided into three projects "business", "reporting", "technical"
- qalingo-webapp-frontoffices : Fronts "prehome", "mCommerce"

*Qalingo : B2C Web classic Frontoffice & Backoffice on GitHub

Qalingo : B2C Web Remote

- qalingo-webapp-remotes : Fronts "remote" Rest / Webservices (for mobile apps)

*Qalingo : B2C Web Remote on GitHub

Business perspective, the target of the first draft:
  • Catalog management customizable by market. So there is a definition of three levels of Market objects and the last one for the localization. Marketplace> Market> MarketArea> Localization.
  • Theme by market and using the filter device API Wurlf
  • Rewritten URLs
  • Security via Spring-security
  • Simple management cutomers
  • Attributes object Management for Customer / ProductCategory / ProductMarketing / ProductSku / PaymentGateway / Store
  • Simple Tunnel
  • Customer Wishlist
  • Management of business rules via Drools
  • Research via SOLR
  • Generation of translations from an Excel sheet dedicated to business teams
  • PreHome dedicated to redirect to the n markets
  • OpenStreetMap for a list of outlets
Your support, your help, comments and advice are welcome.

Next steps, alpha version on December, a beta in early 2013, a 1.0 spring 2013 (after returns):
  • Clean code
  • Optimize the code
  • Write the unit test
  • Define all types of Exception and associated logs
  • Backoffices design
  • Design "remote" Rest for mobile apps
  • Connect the ecommerce project to a CMS like Alfresco by CMIS standard (open CMIS/Rest) to synchronize the two environments
  • Writing Drools rules
  • Brainstorming on "bundles"
  • Brainstorming on "changesets"
  • Exports/Imports ?
  • Brainstorming to allow "hooks/plugins" other than overloading the Spring beans
  • Liferay portlet webapp connected to the "remote" Rest?
  • A long list of things to do, even for a simple ecommerce ...

Frameworks stack:

Spring 3.1.2.RELEASE
Hibernate 4.1.7.Final
ehcache 2.6.0
Velocity 1.7
JQuery 1.7.2
Spring-Batch 2.1.9.RELEASE
Spring-WS 2.1.0.RELEASE
Spring-Security 3.1.2.RELEASE
Boostrap 2.2.1
Wurlf/ScientiaMobile 1.4.2
SOLR 4.0.0-BETA
DROOLS 5.4.0.Final
logback 1.0.6

Tools:

Maven 3.0
MySql (server) 5.1.51
MySql (driver) 5.1.9
Apache-tomcat 7.0.22
Apache 2.2
Java 1.6.0_22

Although I appreciate this framework and not wishing too much different frameworks, i abandoned Vaadin. Backoffices are build with Bootstrap theme / Font Awesome as frontoffices.

I will continue to commit on github, and publish more documentations on the blog.

To Be Continued...

mercredi 25 avril 2012

Quick tip, svn files clean your project with Dos command

Un rapide post, pour partager une commande que je me surprends encore à utiliser au demarrage d'un projet composé de copier/coller ou d'autre projets.
La commande Dos supprime de manière récursive l'ensemble des fichiers SVN :

for /f "usebackq" %d in (`"dir *.svn /ad/b/s"`) do rd /s/q "%d"

... et bien utile vu que tout n'est pas encore sous Git ;)

A quick post to share a tip. I'm suprise to using an old command to clean a project after somes copy/paste or build from others projects.
This Dos command recursively deletes all files SVN:

for /f "usebackq" %d in (`"dir *.svn /ad/b/s"`) do rd /s/q "%d"

...and very useful because not everything is still under Git ;)

samedi 3 mars 2012

Sql Server JDBC driver fail with sdk 1.6.0.29

Si vous utilisez un SQL Server avec le driver JDBC de Microsoft et le SQK 1.6.0.29 d'Oracle, sachez que celà ne fonctionnera probablement pas.
En effet vous riquez de perdre comme moi quelques heures précieuses. Il faut manquer de chance pour tomber sur ce problème de version mais il exite.
Aucune log ne met bien en exergue le problème. La solution reste cependant assez simple puisqu'il s'agit juste de changer de SDK.

Un lien qui m'a confirmé ce problème sur le forum d'Oracle

If you use a SQL Server with the JDBC driver from Microsoft and Oracle SQK 1.6.0.29, know that it probably will not work.
Indeed, you risk losing a few precious hours like me. It is be unlucky to come across this version problem.
No log is strongly underlines the problem. The solution is quite simple, just to change the SDK.

A link who confirmed this problem on the Oracle forum

mardi 21 février 2012

Spring-security @ Autowired is null if the element <debug/> is present

Si vous avez des valeurs "null" au niveau d'injections qui devraient fonctionner, donc déclarées par un scan, voici peut-être une piste.
J'ai perdu un peu de temps sur le fait que l'élément <debug/> corrompait les injections Spring. Faute de recherche et d'infos sur cela, j'ai trouvé de façon empirique.
Je vous invite à vérifier votre applicationContext dédié à spring-security et à commenter cet élément pour tester et vérifier qu'il est bien la cause du problème.

L'élément <debug/> est déclaré dans spring-security 3.1 xsd

If you have any null values with Autowired injections that should work, so declared by a scan, maybe the following info is the solution.
I lost a little time on the fact that the element <debug/> corrupted Spring injections. I didn't find info on this, I found step by step.
I invite you to check your applicationContext dedicated to spring-security and comment this element to test and verify that it is causing the problem.

This élément <debug/> is declared in the spring-security 3.1 xsd