Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Cross platform perl development

by simon.proctor (Vicar)
on Jul 23, 2001 at 15:55 UTC ( [id://98979]=note: print w/replies, xml ) Need Help??


in reply to Cross platform perl development

If this project is as large as you make out then the platform for it is not really an issue. Whether you use MySQL, PostGres or SQLServer (amongst others) you will want them on their own machine and connect to them via the DBI and the relevant DBD driver (ODBC, PG etc).

As for a scripting language - why not use Perl itself? You can quickly define a set of macros and comeup with an application object that presents a partcular API. Its then trivial to check for bad code, to untaint and to run the app.

Through your API you can also abstract any common tasks and allow the 'programmer' to do stuff quickly and easily.

If you are using Perl because of simplicity and power - why not use it throughout?

Replies are listed 'Best First'.
Re: Re: Cross platform perl development
by kapper (Chaplain) on Jul 23, 2001 at 16:08 UTC

    If this project is as large as you make out then the platform for it is not really an issue. Whether you use MySQL, PostGres or SQLServer (amongst others) you will want them on their own machine and connect to them via the DBI and the relevant DBD driver (ODBC, PG etc).

    I totally agree with you on that for large sites, but the system must easily support small sites as well as large. In other words, we need to have an install plan, that will work nicely on a small server, as well as for large clusters, where we offcourse as you suggest, will have dedicated database servers. Another issue for some of our smaller customers, is cost, some of the larger DBMS's can have a pretty hefty price tag. Therefor, the system should work with both a small preferably free DBMS, as well as a large commercial DBMS on a dedicated server.

    As for a scripting language - why not use Perl itself? You can quickly define a set of macros and comeup with an application object that presents a partcular API. Its then trivial to check for bad code, to untaint and to run the app.

    ...would be pretty cool from a programmers point of view =). I did give it a few thoughts earlier, but dismissed it as beeing to hard for non programmers to learn.... aaand, I wasn't sure how to go about with the "bad code" checking... anybody have any pointers to some information about that? similar projects or something like that?

    thanks for your reply! it gave some good food for further thoughts...
    Kasper

      I was part of a project that, among many other things, created our own scripting language. It was extremely basic, using \n to indicate the end of a statement and implemented only SET/JMP/JZ/JNZ/IF/ELSE/ENDIF/WHILE/FOR/RETURN. That was it.

      Now, this wasn't OO. However, what concerns me is that you want to create an OO language and expect non-programmers to be able to handle it. That's got "Bad Plan"(tm) written all over it. Perl is the easiest "real" language to learn, except for VB. (Maybe that's why M$oft made VB their scripting language of choice?) Start small. If you're smart in your design, the language should be upgradeable without impacting anything else. (Maybe a Script::* set of modules?) Plus, demanding that your users actually understand the basics of procedural programming isn't unreasonable - it's almost expected, these days. If your users demand scripting capabilities, you can demand knowledge. (Unless, of course, you were planning on writing a GUI "editor" that allowed them to drag-and-drop statements from a list... if you're doing that, quit your job and write a game.)

      As for bad code checking, use eval. Let the interpreter check bad code for you! Oh, you can do basic easy stuff, like balance parentheses and the like, but don't do any complicated syntax or nothing. Why kill yourself when Perl does it already??

        Now, this wasn't OO. However, what concerns me is that you want to create an OO language and expect non-programmers to be able to handle it. That's got "Bad Plan"(tm) written all over it. Perl is the easiest "real" language to learn, except for VB. (Maybe that's why M$oft made VB their scripting language of choice?)

        While I apreciate your comment, I must say that I strongly disagree with you. Very strict OO languages, can be made very learnable for non programmers by giving it the right interface. Have a look at what Alan Kay have done with Squeak, it certainly have made it very accesible to a lot of very inexperienced children....

        Btw. most newer dialects of Logo are turing complete.. would you really say that Perl is easier to learn than Logo? *grin* =)

        If your users demand scripting capabilities, you can demand knowledge

        he he... but knowledge not including OO? The fact is that the system itself is build around the notion of objects. A web page for example is presented to the administrators as an object viewable through a web browser, so the object based thinking is there allready. For example, if the script writer want the name of a specific user, it might be available as an instance variable on the users object (ie. the page showing the CRM data for the specific user).

        Unless, of course, you were planning on writing a GUI "editor" that allowed them to drag-and-drop statements from a list... if you're doing that, quit your job and write a game

        Well.... I do plan to make a GUI which will make an easier entrance for inexperienced users, alongside the full access to the scripts. However, I don't see how this changes the knowledge required towards understanding procedural vs OO thinking.

        Btw... we do alot of game programming, and quite frankly, it is a _lot_ harder than most people think.

        As for bad code checking, use eval. Let the interpreter check bad code for you! Oh, you can do basic easy stuff, like balance parentheses and the like, but don't do any complicated syntax or nothing. Why kill yourself when Perl does it already??

        Well, I didn't plan to kill myself, but simply use a YACC... the right tool can often make a big difference towards how hard a thing is to implement =)

        Kasper

      As a small database on small system:
      Do you mean simple PC? I run MS Access with 3GB database, and it survived. MS Access is "free": bundled in MS Office pro, you have MS Office anyway, right? You can access Access database (MS Jet Engine) via ODBC and DBI just fine. Your SQL will be multi-platform as long as you will use only standard SQL and avoid any proprietary extensions - but DBI will wisely guide you to use standard SQL only ;)

      pmas
      To make errors is human. But to make million errors per second, you need a computer.

        Do you mean simple PC?

        Hardware wise, yes, but software wise, no... While MS products might seem cheap (Yearh right), to some home users, try equiping even a small organization with around 50 people with Win2K and Office pro licenses.. not a pleasent experience.

        Furthermore... I reeeeally don't like access, for everyday I have used it, I have become more and more sure, that it is actually just minesweeper with a few added lines of code =)

        ...well maybe that was a bit harsh, i find access very adeqate (..hmm.. aparently my english spelling abilities have gone after just two beers) for some smaller jobs, but would rather not use it for anything so serious that I could not just as easily have used text files for the job.

        Kasper

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://98979]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-03-28 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found