Pages

Wednesday, April 21

FP going to support MySQL

We have eventually decided to add MySQL support in next releases. MySQL is most popular database for web system and it should encourage web developers to develop web POS.

Porting or adding option for different database systems is easier job in Floreant POS as we used hibernate based abstraction layer( DAL ).The developers who cannot wait to see should go through this hibernate tutorial . You may also try with any other datatabase system as long as it has Java driver available.

Sunday, April 18

Connecting PHP 5.3 and Apache Derby / JavaDB / IBM Cloudscape


[This has been outdated] PHP Developers can connect Derby database of Floreant POS with following steps. It has been tested in PHP 5.3 and should be working in PHP 5.2

Necessary Steps
PHP has different APIs for different databases and PHP can connect to Apache Derby (formerly known as Cloudscape) with DB2 connectivity.  For successful connection we need to go with  the following steps. Examples are from Ubuntu 9.10 but it should be working other linux distributions with respective commands.


Install DB2 Express C
Download it from here . Extract and run ./db2setup


Download & Compile PHP Source code
  1. Download PHP 5.3 or the latest version. If you are using Ubuntu write
    wget http://us3.php.net/get/php-5.3.1.tar.bz2/from/us.php.net/mirror
  2. Untar source code in /usr/src
    tar -xjf php-5.x.x.tar.bz2
  3. Build make file with with desired parameters
    ./configure --with-apxs2=/usr/bin/apxs2 --with-config-file-path=/etc/php5/apache2/ --with-mysql --enable-inline-optimization --disable-debug --enable-bcmath --enable-calendar --enable-ctype --enable-dbase --enable-discard-path --enable-exif --enable-force-cgi-redirect --enable-ftp --enable-gd-native-ttf --with-ttf --enable-shmop --enable-sigchild --enable-sysvsem --enable-sysvshm --enable-wddx --with-zlib=yes --with-openssl --with-xsl  --with-gd --with-gettext --with-mcrypt --with-mhash --enable-sockets --enable-mbstring=all --enable-mbregex --enable-zend-multibyte --enable-exif --enable-soap --enable-pcntl --with-mysqli --with-mime-magic --with-iconv --with-pdo-mysql --with-freetype-dir=/usr/include/freetype2/freetype  --enable-cli -disable-cgi --with-pdo-ibm=/home/db2inst1/sqllib/

    NOTE:  If you find dependent files are missing install them. Following examples are for Ubuntu 9.10 . Other distributions should have similar commands.

    #apxs2 was not installed so updated with
    sudo apt-get install apache2-threaded-dev

    #libxm2-dev not found so installed
    apt-get install libxml2-dev

    #freetype now installed found solution: http://theserverpages.com/php/manual/en/function.imagefttext.php
    apt-get install libfreetype6-dev

    #libmcrypt not found. so installed
    sudo apt-get install libmcrypt-dev

  4. Compiled PHP
    sudo make 




    #Error while doing make install
    # apxs:Error: Activation failed for custom /etc/apache2/httpd.conf file..
    # apxs:Error: At least one `LoadModule' directive already has to exist..


    Noted that: Its a bug in PHP 5.3
    Added this to  /etc/apache2/httpd.conf and the module built correctly.
    # Placeholder for future module installations or else modules will fail to build
    #LoadModule dummy_module /usr/lib/apache2/modules/mod_dummy.so
  5. Stopped any apache2
    sudo /etc/init.d/apache2 stop
    Make install
    sudo /etc/init.d/apache2 start
  6. Write a simple php file index.php with


    and save as  /var/www/index.php
    Now browser should show php info page. If everything is ok, it should show pdo_ibm and ibm_db2 enabled.

DB2 CATALOG Configuration
  1. Login  DB2 primary account (default is db2insta1).
  2. go to /home/db2insta1/sqllib/bin
    and run ./db2
  3. Register Derby Database server as Node
     db2 catalog tcpip node floreantpos remote 192.168.16.105 server 1527
  4. Register Database in that Node.
    catalog db "posdb" at node posdb authentication server

    NOTE: database  name shoud be same as Floreant POS Derby Database. While doing these steps you must run Derby Database.
    DB2 in Linux does not find Database in smaller case. In case of default database (posdb) we
    just created softlink of database folder and found it working smoothly.

    ln -s posdb POSDB
  5. Connect database to test
    connect posdb with user name "app" and using sa

    For more visit the following link:
    http://www.ibm.com/developerworks/data/library/techarticle/dm-0409cline2/readme_win.txt




Test with PHP
      
In /var/www/ write a php file to check if it can connect



 $database = 'posdb';
$user = 'app';     //derby pass
$password = 'sa'; //your pass
$hostname = '192.168.16.2'; //your IP here
$port = 1527;

$conn_string = $database;


$conn = db2_connect($conn_string, $user, $password);


if ($conn) {
    echo "Connection succeeded.";
    db2_close($conn);
}
else {
    echo "Connection failed.";
}

?>

Wednesday, April 14

Coke vs Orange Juice Companies

Src: Food service forum

Why promote Open Source? Do you programmers not want to be paid for your work? What do you only want part-time editors making changes as their hobby? It just doesn't make sense to me. Please explain if I've got it wrong, but that won't change my opinion.

Robert Lehman
www.ViewGistics.com

Dear Robert,

Open source is an established business model. Instead of selling software license, open source model sells service (support, customization, modification of reports etc). There are many successful projects who left their source open and still making enough money to sustain.

Traditional software business rely on hiding source code and they may get surprised how a software company can survive giving away their hard work.

Let me give answer your question with a layman's example. Think

-Source code is like Recipe for Cooking.
-Compiling can be compared to Cooking and
-Binary Executable are final cooked food.

Now Closed source (Traditional) companies are those restaurants who hide their recipe. They hide recipe because no other can produce same taste, so they would make more profit and lock their guests. This model works when cooks get sure their recipes are unique.

But we know there are already lots of Recipe books in the market and one can cook delicious foods without special recipe. Most of the restaurants in the world in fact runs with common recipes and people eats there even though they could cook same thing at home.

Interestingly all those generic recipe restaurants make business. How can they survive? Reason is market is so big that one player cannot capture the whole. Guests can find food in his area and whoever gives better service makes better profit.

I told before that Close source works best when you have a special formula that nobody could repeat (like Coca cola). In software highly researched mathematical program could be similar candidate, But Restaurant business, Accounting or ERP has almost similar business process for many years. Literally there are nothing new and most of the software we program reinvents the same wheel. In contrast to Coke, It could be Orange juice where many companies can produce same orange juice and make business.

In Assembly or machine language days all software companies were locking business like Coke companies! There was a day when writing code required huge time and compilers were expensive. Now paradigm has changed. There are IDE, Wizard and tons of freely available snippets, that reduced cost of software. So its proven that hiding source code now give little advantage. In contrast if a programmer give away the source code in public domain he may invite our competitors to work on same code but market will expand dramatically. Such way it benefits a big community.

Not sure if you could get some idea from that. I would be happy to answer specific questions because we have always faced those questions.

Tuesday, April 6

A new release with better look in Subversion

As promised, a new release has been updated in Subversion. There are many small changes and fixes
  • Printer configuration - Now all the printers will be automatically shown in drop down list.You don't even need JavaPOS for printing. Epson  usually provides advanced printer driver in their installation CD. In other case contact the brand owner.



  • Printer receipt preview, you can also save receipt in PDF, DOC etc format 




  • Eliminated prompting Beverage by guest count. Small restaurants do not need that. 
Developers are requested to try it and send us their comment.

Send your suggestions to this email address. We will build binary end of this week.

Wednesday, March 31

Reasons you should try open source

My reply submitted in Food service forum.
There is a funny story that once a man who moved to a new place asked a Car dealer how to go to nearby grocery. The grocery was infact 3 blocks away but the car dealer explained that he must buy a BMW because it would save time & money for buying fuel (because certain models were hybrid) and he could reach grocery store in only 3 minutes time (if he walk it would take 15 minutes, :()!

Here Le Crossant should not be deterred by XYZ compliance. He told he had been running a small coffee shop with Cash register. He needs a small solution. If he can go walking he may need a bike or small car. Not BMW.  All XYZ compliance were to ensure rip off simple guys walking in front of store with FUD theory.  If I were in his shoe, I would select any Decent system that has lowest installation cost, can be maintained by myself, or I can hire local technician or IT guy with few hours contract to customize to produce daily and weekly sales report.

Cost effective means if a shopping bag can be carried by one hand, spent few bucks for a Cart to make it easier but must say NO to any offer for riding elephants!

Everyone should try Open source before dealing with any closed soruce product. Two main reasons. First of all he does not need to pay single cent to use it as it is.  ( I use Firefox and Apache - they don't charge any thing but their source is there). Well, there are FREE closed source products. Why should you avoid them?  Because you never know if this is Free cheese in mouse trap, ie, if there are daemon under the hood,  some day would change policy and force you to pay a lot , or die suddently, or ask your head for changing some report.  In case of open source you have everything - including source code and your son who knows few lines of programming can fix typos. Or you can go to oDesk or Rent-a-coder or hire someone recompiling code in few bucks. Interestingly if you hang on the forum you can get same thing in almost at zero cost. Second reason its good is even the coders of open source die you still have source code to survive! Open source community also reports all known errors and often community users fix them. So they become less buggy than Polished Brands (I saw most of the Polished commercial software love to hide their bugtrackers)!

Open source is a new business paradigm. It does not lock you and its more secured than Hidden code ( who knows Free or low cost Closed soruce has a malware to track you).  If some say hey your Software is not XYZ compliant, you just request original developer to make it! You may pay the same amount but you have full control in your hand.

Tuesday, March 30

FP Bug tracker

Updated: We have discontinued bug tracker in sf.net.
 Submit bug to our jira issue tracker http://team.orocube.net


The first reported bug
Genrom0  has reported decimal bug in discount system. Thanks.

Saturday, March 27

Download page redesigned


Our official site has been redesigned by our great web developers in Moonrank (http://moonrankusa.com). Thanks folks, its well organized. Visitors can easily download latest Source code and Binary distribution in the same page( http://floreantpos.org/download ). Tutorials are also linked there. It was so tough to update too many links in different pages, now its much easier. Well, one more news. Should see a freshly built forum in our home page soon - just stay tuned.

Tuesday, March 16

How to compile Floreant POS source code in NetBean


We have updated our wiki with step-by-step guide for setting up NetBean IDE. We also showed how to connect Database, compile source code and check your modified application in few easy steps.


Wednesday, January 6

Fun Idea: building large Touch screen with Wii Remote / Wiimote

Does you Restaurant need a large Touch for training purpose?
Got inspired by Jonny Lee who hacked Wii Remote and turned the $40 video game controller into a digital whiteboard, a touchscreen. He has released source code of a library that you can even build touch screen with large image in a LCD screen or even a projector. Don't like hacking? I found Ebay Sells a full kit in $149