Recent

Author Topic: Is Lazarus a good answer for my simple program?  (Read 9588 times)

aaronb50

  • Newbie
  • Posts: 4
Is Lazarus a good answer for my simple program?
« on: May 09, 2013, 07:03:01 pm »
My company uses MC9090 scanners.  We use third party software to scan barcodes and process the information.  We need the scanners to be able to do a little more then what they can do now but the third party wants to bill us more than they already to annually to make a simple program for us.  I know if I had the software used to write programs on the scanners I could write the code myself.  I did some googleing and came across this web site.  I saw a thread somewhere in here yesterday where someone said their company was using Lazarus to write programs for the MC9090 scanners.  I looked at some of the screen shots on the site and this looks like exactly what I’m looking for.   But before I go tell my boss I can do this and we get the software approved and I buy books with Lazarus code in it, I just wanted to ask if this will actually work for the scanners and can it do what I need?       
All I need the program to do is store about 100 items that are scanned in. 
Let me delete items and replace items from that scanned in list.   
And when I dock the scanner have the list sent to a file located on my desk top.
I know I could do this in a few hours with VBA and a cordless input only scanner but my company is heavily invested in these MC9090s already so they want to make this process work using them. 
Is Lazarus a good direction for me to go with this?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Is Lazarus a good answer for my simple program?
« Reply #1 on: May 09, 2013, 07:44:31 pm »
Quote
I just wanted to ask if this will actually work for the scanners and can it do what I need?
Yes, it's a matter of reading something from COM/USB port.
Quote
Is Lazarus a good direction for me to go with this?
It depends. How well do you know Object Pascal? How well do you know RTL/FCL/LCL? In a commercial company, surely time is a constraint (even in free software, sometimes it applies). If you really know nothing about Lazarus, Free Pascal or Object Pascal is general (say you're coming from Delphi) then I think it's better to do it in what you're capable of. There's a learning time penalty that you have to pay.

aaronb50

  • Newbie
  • Posts: 4
Re: Is Lazarus a good answer for my simple program?
« Reply #2 on: May 09, 2013, 08:58:20 pm »
I know nothing about Object Pascal, RTl/FCL/LCL. 
But time and the ok to teach myself a new language on the clock is something I have.  We have a backup system in place to get the job done but we want to get away from that.  So even if it takes me all summer to get it figured out I’m good to go. 

I can usually, by reading threads and forums, figure it out myself. But a point in the right direction to get started would be awesome!!!!
Going to need some code, guess I’ll order one of the books for sale on the site here.
Need to get the software approved.
Ill down load it at home and play with it on my off time to try and get a good hold of how its working while I’m waiting for the approval. 

bambamns

  • Full Member
  • ***
  • Posts: 223
Lazarus 1.8.4 + FPC 2.6.4 x86 (rebuild) and Lazarus 2.0, Windows 7 x64, unless otherwise specified

aaronb50

  • Newbie
  • Posts: 4
Re: Is Lazarus a good answer for my simple program?
« Reply #4 on: May 09, 2013, 09:08:52 pm »
Outstanding.  Thank you both!!!  I hope I'm not getting in over my head but I think I can do this.

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: Is Lazarus a good answer for my simple program?
« Reply #5 on: May 09, 2013, 10:11:19 pm »
There's a learning time penalty that you have to pay.
Don't forget experience.
There's a reason that the 'third party' asks a fee for developing the new software.
Developing with Lazarus (or Delphi) cannot be learned by merely reading books or forums or a bit 'playing and fiddling' (like with VBA).
Nevertheless, looking forward to your questions.
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Is Lazarus a good answer for my simple program?
« Reply #6 on: May 10, 2013, 12:31:08 pm »
There were some issues with old WinCE versions. I don't know if there are still with old WinCE version so you should check WinCE version on your device. Empirical way to test it would be to first compile a single 'hello world' application with just a form and a single button showing a message, and then test it on your Symbol/Motorola handheld. When you have that working you have two ways to use barcode feature of your scanner. First would be a background application provided by Symbol which translates any barcode scanned into ASCII readable text. This is handy if you have cursor positioned into a numeric or alphanumeric edit field where user can type barcode or accept one from background application, which will after scanning jump cursor to next edit field if it exists (so you can make multiple scans if needed). The other way is to use Symbol API for WinCE and have more control of barcode scanning in your application. These API calls are wrapped in a nice component for Lazarus. You can find it here: http://wiki.lazarus.freepascal.org/SymScan. You will need to learn how to install component in Lazarus to use it efficiently. Cross compiling for WinCE is not trivial. If you can't make it work with plain Lazarus, then you can use Lazarus CT edition. Link is here: http://www.pilotlogic.com, and tutorial for compiling your first WinCE application is here: http://www.pilotlogic.com/codetyphon/help/cross_build_for_windows_mobile.htm

You should also read following topics:
http://www.lazarus.freepascal.org/index.php/topic,17738.msg99257.html#msg99257
http://www.lazarus.freepascal.org/index.php/topic,19287.msg110435.html#msg110435
http://www.lazarus.freepascal.org/index.php/topic,5607.msg81326.html#msg81326
http://www.lazarus.freepascal.org/index.php/topic,14091.msg81325.html#msg81325
« Last Edit: May 10, 2013, 12:34:10 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

aaronb50

  • Newbie
  • Posts: 4
Re: Is Lazarus a good answer for my simple program?
« Reply #7 on: May 10, 2013, 06:03:10 pm »
Unfortunately I don’t have a scanner at home and I can’t download Lazarus at work till it gets approved.  But I will follow all these links and do what homework I can from home and try to get a Hello World at least working on my computer.   
I’m hoping it will not take more than a month to get approved. 
Thank you all for the advice and links to information. 

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Is Lazarus a good answer for my simple program?
« Reply #8 on: May 15, 2013, 09:58:33 am »
Hmmmph, here we go again with the "this language is superior to that language" thing...

Developing with Lazarus (or Delphi) cannot be learned by merely reading books or forums or a bit 'playing and fiddling' (like with VBA).
Of course it can, just as much as you can learn VBA (or C, C++) doing the same.

I do agree that with any language, just playing and fiddling may lead to awful spaghetti code programs that may just do what you want in normal circumstances but fail horribly in any unforeseen situation.
The quality of the coding is basically due to what examples/books/forums the new dev read and whether he's really only modifying existing bad code or integrating his knowledge so he can detect and avoid bad coding habits. A programmer could write beautiful, maintainable code in VBA or horrible code in FPC... or vice versa.

That said, there's a commendable quality in many Pascal programmers in that they want to have clean, understandable code. The language (examples etc) itself of course also encourages this.
Also, the popularity of VBA has lead to many bad/beginning programmers to use that language. Doesn't necessarily mean the language is bad - it's just attractive for beginners.
</end rant>


On topic: I'd think Laz/FPC has a nice forum support community that can be of big help if you ask the right questions (as the OP has been doing ;) ). That's an advantage.
Of course, big competitors like .Net have a much bigger amount of documentation/samples etc floating around on the web.

  • Can anybody tell already that I used to be an Access/VBA developer in a previous life... where I heard all the "bad code" rants as well.. Sorry if I over reacted, just had to get this off my chest.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

zzzato

  • New Member
  • *
  • Posts: 22
  • A delphi developer who is moving to debian
Re: Is Lazarus a good answer for my simple program?
« Reply #9 on: May 15, 2013, 11:15:23 am »
Some year ago I wrote a WInCE(or mobile...?)  application using M$vs2005, CF 2.0 and M$SqlServer CE...
Was an hell.
I had a lot of issue, on ide and on database, and CF 2.0 was very poor.
Maybe toady visualstudio , .Net and M$Sqlserver ce work fine... MAYBE.....
The only method to know if NOW, FOR YOUR TASK, these tools work fine or not is, simply, TRY IT.
This suggestion is valid for lazarus too: you must TRY.

Averywhere you can read a lot of post about products...
A lot of comment are "it's cool, it's the best, it's powerful, works fine.." and so on...
But only when YOU TRY, YOU understand if a specific tools is a best choice for your task...

Cher.

A.
"Anything that can go wrong will go wrong"

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: Is Lazarus a good answer for my simple program?
« Reply #10 on: May 16, 2013, 01:01:45 am »
Hmmmph, here we go again with the "this language is superior to that language" thing...
Huh? Where?

Quote
Of course it can, just as much as you can learn VBA (or C, C++) doing the same.
Nope; cannot be done.
Will never work.

Quote
Can anybody tell already that I used to be an Access/VBA developer in a previous life...
Yes.

Quote
where I heard all the "bad code" rants as well..
Huh? Not in this thread.
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Is Lazarus a good answer for my simple program?
« Reply #11 on: May 16, 2013, 07:40:19 am »
@eny: let's agree to disagree.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Paul Breneman

  • Sr. Member
  • ****
  • Posts: 290
    • Control Pascal
Re: Is Lazarus a good answer for my simple program?
« Reply #12 on: May 20, 2013, 03:58:11 am »
There are two simple WinCE apps at the bottom of this page:
  http://www.turbocontrol.com/easyfpgui.htm

Those might be the easiest way to try something.

Hopefully fpGUI will be updated soon to again work with WinCE devices.
Regards,
Paul Breneman
www.ControlPascal.com

 

TinyPortal © 2005-2018