login
Header Space

 
 

Re: web development on OpenBSD

Previous thread: Re: vpn, isakmpd, and X509 certificates by Stuart Henderson on Sunday, April 27, 2008 - 4:57 pm. (1 message)

Next thread: Re: Nvidia Quadro NVS 140M by Stuart Henderson on Sunday, April 27, 2008 - 6:05 pm. (2 messages)
To: <misc@...>
Date: Sunday, April 27, 2008 - 4:29 pm

Hello,

I plan to develop a money management app for personal use on OpenBSD. Since I am not big on any backend /prog.language I have decided to ask the experts, what should i choose. Based on the consensus and depth of a response, I will devote my time studying that language/server and try to build this app.

requirement: Browser based app. with AJAX  (multiuser if possible)
my_hardware_limitation: 40gig disk, 1GB RAM , no video RAM, pentium 4 CPU 2GHz
Level of expertise: starter

which components will be a good fit?:

1. Backend: MySQL or SQLite
2. webserver: apache or Lighttpd
3. development language: PHP or Java or Javascript (and XML I guess)

Thanks in advance.
-BG

 ________________________________
~~aapka kalyan ho~~
To: badeguruji <badeguruji@...>
Cc: <misc@...>
Date: Tuesday, April 29, 2008 - 4:08 am

Well, you might as well ask which editor to use, as well.  That will  
start a few posts.
The correct answer is vim, of course!  8-)

My 2c - you will be fine with BAMP - BSD, Apache, MySQL and PHP.
Easy to get going on OpenBSD, well-supported, well-documented (TONS  
of sites,
books, forums, etc.)  Just RTFMs, and find the information that  
emphasizes good
coding practices.

Worry about JavaScript and XML when you need to (and Ajax can be a  
useful tool
in the right places.)

Unless you are an absolute genius, you are NOT going to get this  
right first time,
so the design of the site, the pages, the database, the flow through  
the site - way,
way, way more important than the technologies you use.

Use modules / OOP / shared code.  Use standard SQL rather than  
extensions.

Once you've got the basic plan, do some prototyping, learning,  
tweaking, etc.
You will go around a few times until you get it right.  Don't be  
afraid to refactor
and get things right.

Once it is hanging together and you've actually done some coding,  
you'll find the
technology/language that works *for you*  Maybe you do it in PHP  
first, and then
decide PHP sucks - because you had a plan and a modular (or OOP)  
approach, it
should not take long to move your code to another language/database.

Whatever you go with, be confident that you can upgrade your system  
when issues
are found in those technologies (MySQL, PostgreSQL, PHP, Python, etc.  
have all
have security issues found and resolved in the last 3+ months.)

HTH
To: badeguruji <badeguruji@...>
Cc: <misc@...>
Date: Tuesday, April 29, 2008 - 7:07 am

On Tue, 29 Apr 2008 20:08:37 +1200

PHP is complete crap and a disaster as a programming language. Java is
way too cumbersome. For this kind of use-case, I would definitely use
python and twisted+nevow+axiom.

If you don't know python at all the learning curve for all this might
be a bit step, but probably not worse than having to learn
SQL+HTTP+some other language (especially if you struggle with php).

Nevow is a really nice framework for web-based applications. It also
has all the "AJAX" you need (seamless two-way RPC between python and
javascript). As a persistence system, Axiom is very convenient to use,
but it is sqlite only, and you don't have full control over your DB
schema. You might like it or not.

I would think twice before using this combination for a very very busy
site, but for personnal or "small business" use, it is perfect.

I just imported www/py-nevow a few days ago. check the ports ML
archive for an axiom port.

Eric.
To: badeguruji <badeguruji@...>
Cc: <misc@...>
Date: Sunday, April 27, 2008 - 10:56 pm

Hi there,

I was in a similar position to you a few months ago. I decided to go
with Ruby on Rails, it's really simple! But to get the most out of it
you should buy a book. "Agile Development with rails" is a good one.

It might be worth reading a php + mysql tutorial just to see how yucky it is.

Kind regards,
Timothy.
To: OpenBSD general usage list <misc@...>
Date: Sunday, April 27, 2008 - 9:20 pm

Since people were running multi user systems on UNIX on 64k of ram in the
past, this should not present any kind of issue.  You'd probably want to
investigate tools that allow you to profile usage so that you can see which


As others have mentioned - postgresql.  Superior database, scalable above 8
cpus, unlike mysql.  And everything comes with it, unlike mysql, where you
have to pay for "enterprise features" (at least 4.x, no idea about 5.x).

If you want to run it on a default openbsd box - apache 1.3.

On language - remember, PHP's design goal (as late as v3) was for complete
non-programmers to be able to pick it up and write programs immediately.
You can imagine how that can cause issues for security.  Most libraries or
add-ons you install for PHP require you to run in insecure mode.  PHP is the
opensource answer to visual basic, in the "yes, we can create absolute
insecure crap too" sense.  If you want to do something similar to what
openbsd is doing, use C.



-- 
http://www.glumbert.com/media/shift
http://www.youtube.com/watch?v=tGvHNNOLnCk
"This officer's men seem to follow him merely out of idle curiosity." --
Sandhurst officer cadet evaluation.
"Securing an environment of Windows platforms from abuse - external or
internal - is akin to trying to install sprinklers in a fireworks factory
where smoking on the job is permitted." -- Gene Spafford
learn french: http://www.youtube.com/watch?v=j1G-3laJJP0&amp;feature=related
To: bofh <goodb0fh@...>
Cc: OpenBSD general usage list <misc@...>
Date: Monday, April 28, 2008 - 8:56 am

In my opinion it's not impossible/hard to write secure code in PHP, 
don't compare it to Visual Basic please :)
And to do some web development in C it's a little insane, except when 
you need some resources/speed other languages don't provide.

Maybe the best languages for start web development would be PHP and 
Perl, i don't know about ruby since i've never used it, but a lot of 
people talks nicely about it ;)

HTH,
Vinicius
To: Vinicius Vianna <ds@...>
Cc: bofh <goodb0fh@...>, OpenBSD general usage list <misc@...>
Date: Monday, April 28, 2008 - 5:50 pm

The current situation sucks a bit.

You've got a choice of classical web dev environments, like perl's Mason,
which are fast, but a bit difficult to code for, and so-called `modern'
web environments, like ruby-on-rails, or perl's catalyst (or php symphony,
if I'm right), which would be nice, except that they're REAL SLOW, and so
you need a killer machine to run any kind of web server.

Google's approach of compiling java into javascript has not yet made it
to the world of php/perl/python, as far as I'm aware, though it might be
the real solution for maintainable ajax...
To: <espie@...>, Vinicius Vianna <ds@...>, bofh <goodb0fh@...>, OpenBSD general usage list <misc@...>
Date: Monday, April 28, 2008 - 6:04 pm

I Wonder what amazon.com and Ebay.com use? it would stand to reason
that they would need speed any place they can get it.
I wonder if they use C?

Sam Fourman Jr.
To: Sam Fourman Jr. <sfourman@...>
Cc: OpenBSD general usage list <misc@...>
Date: Tuesday, April 29, 2008 - 11:42 am

AFAIK Amazon.com is primarily developed using Mason, an excellent "Perl-based 
web site development and delivery engine" - I highly recommend it:

http://www.masonhq.com/

-- 
----------------------------------------------------------------------------
             =&gt; Joel Sing | joel@ionix.com.au | 0419 577 603 &lt;=
----------------------------------------------------------------------------

         "Real stupidity beats artificial intelligence every time."
          - Terry Pratchett, Hogfather
To: Joel Sing <joel@...>
Cc: Sam Fourman Jr. <sfourman@...>, OpenBSD general usage list <misc@...>
Date: Tuesday, April 29, 2008 - 1:44 pm

Yeah, historically, that's been the case.

I have absolutely no clue whether the current incarnation of amazon is
still HTML::Mason, though.

while mason is very nice for pure web template code, it does absolutely
nothing to help you organize your DB access, or even give you sane urls for
interactive sites.  You really need something like Class::DBI / DBIx::Class 
or Rose::DB for that.

The current trend is Catalyst, which is very nice, but really slow compared
to mason... it uses a lot of new-fangled perl features, which are not
exactly fast (especially multiple inheritance).
To: <misc@...>
Date: Monday, April 28, 2008 - 6:34 pm

I remember seeing "Sun" microbanners here and there on eBay, it might
scream "Java".
To: Bertrand Janin <tamentis@...>
Cc: <misc@...>
Date: Tuesday, April 29, 2008 - 11:15 am

I am currently running a web site which says http://joomla.*

Strangely enough, it's a drupal site, with  no joomla at all.

(after spending a week of hair pulling trying to coerce joomla
to do whatever I wanted, as the `best-of-breed' solution of choice
to brain-dead newbies, I settled on a sensible CMS that actually
works)
To: Marc Espie <espie@...>, <misc@...>
Date: Tuesday, April 29, 2008 - 12:10 pm

I am curious to know which one?

I have been banging my head into joomla for a while,
and maybe it can do what I want, but I want user
names and passwords encrypted among other things
and that does not seem to be among their design choices...

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB
To: <misc@...>
Date: Tuesday, April 29, 2008 - 1:47 pm

Sorry, don't want 100s of people to bang on it, as the server isn't

If you have any amount of logic, you'll find drupal to be quite refreshing
for a change. And yeah, drupal has various secure modules that help. The
OpenBSD ports include more or less the plugins I use, there are hundreds
more where that comes from.
To: <misc@...>
Date: Wednesday, April 30, 2008 - 3:36 am

Oops my bad english. I thought drupal was a for me unknown
common english word, not a CMS name. It was which CMS

From which release is Drupal in ports? I can not find it
in OpenBSD 4.1. I know it is time to upgrade but my 
installation runs sooo nicely now.

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB
To: Raimo Niskanen <raimo+openbsd@...>, badeguruji <badeguruji@...>
Cc: <misc@...>
Date: Thursday, May 1, 2008 - 3:46 am

Which brings us back to the OP's question on web
development software on OpenBSD ...

Drupal is happiest on (L/B)AMP ...

http://drupal.org/requirements
To: Richard Toohey <richardtoohey@...>
Cc: Raimo Niskanen <raimo+openbsd@...>, badeguruji <badeguruji@...>, <misc@...>
Date: Thursday, May 1, 2008 - 9:21 am

Technically, drupal is just an extensible cms.
web development still encompasses way more than that. ;-)
To: <misc@...>
Date: Wednesday, April 30, 2008 - 8:13 am

4.3, excellent time to update.
To: Bertrand Janin <tamentis@...>
Cc: <misc@...>
Date: Monday, April 28, 2008 - 7:41 pm

But, sometimes, you see someting like this: 
http://cgi3.*ebay*.it/ws/*eBay*ISAPI.*dll*?ViewUserPage
So, as you can see, this horrorful extension seems to scream "Micro$hit 
environments"
No?
To: raven <raven@...>
Cc: Bertrand Janin <tamentis@...>, <misc@...>
Date: Monday, April 28, 2008 - 9:01 pm

eBay used to use C++. There was a .pdf some time ago where they  
described some of their C++ stuff (and compiler errors like "too many  
class methods", good ol' code generators...)
They've since moved to Java, but I don't remember if it's a 100% Java  
shop now.

As for Amazon, look at their Web Services for some ideas. Also, Steve  
Yegge's old blog (don't have the url at hand) has many pointers.

So, yes, go for Python wherever you can. Ruby is in very bad shape  
internally (language can be as "pretty" as they want, but VM is what I  
care about the most).
PHP, well... you should use it ONLY if you know *exactly* what you're  
doing, otherwise it's worse than C++ when it comes to "shoot yourself  
in the foot".
There are some very nice alternatives, like seaside/Smalltalk.
To: Bojan Nastic <bojannastic@...>
Cc: Bertrand Janin <tamentis@...>, <misc@...>
Date: Tuesday, April 29, 2008 - 7:41 am

Python is mature, but working with frameworks like Zope/Plone, it's 
really bad... It's crappy. I'm more confortable with django...Much more 
MVC (or as django team says, MTV).
I agree with you, php it's good just if you know how to develop, or just 
use CakePhp another MVC framework..
I think that all depend of what you have to do... And how much scalable, 
your application need to be...
To: bofh <goodb0fh@...>
Cc: OpenBSD general usage list <misc@...>
Date: Sunday, April 27, 2008 - 10:50 pm

[...]

IMHO, C is not very easy to pick up for a started, and is not very
well suited for web-development (well, yes, there are web apps in C,
but they are exceptions than the norm). I strongly recommend python,
as I find it easier to learn and get productive. Plus it allows you to
use object orientation, once you are comfortable with it.

-Amarendra
To: Amarendra Godbole <amarendra.godbole@...>
Cc: bofh <goodb0fh@...>, OpenBSD general usage list <misc@...>
Date: Monday, April 28, 2008 - 9:22 am

I agree with Amarendra. It's more difficult to write "sane" code in C 
than in python or ruby. I choose Django (Python) to develop my blog, and 
RoR to develop my work appliances.
I think that postgres it's awesome.
But if anyone can write a FREE (BSD) good framework for c/c++ web 
appliances, c/c++ it's the best choice ;)

[raven]
To: OpenBSD general usage list <misc@...>
Date: Sunday, April 27, 2008 - 10:56 pm

On Sun, Apr 27, 2008 at 10:50 PM, Amarendra Godbole &lt;


Python is good.  Google hired the guy who wrote python, so you know the
language will be well supported.



-- 
http://www.glumbert.com/media/shift
http://www.youtube.com/watch?v=tGvHNNOLnCk
"This officer's men seem to follow him merely out of idle curiosity." --
Sandhurst officer cadet evaluation.
"Securing an environment of Windows platforms from abuse - external or
internal - is akin to trying to install sprinklers in a fireworks factory
where smoking on the job is permitted." -- Gene Spafford
learn french: http://www.youtube.com/watch?v=j1G-3laJJP0&amp;feature=related
To: badeguruji <badeguruji@...>
Cc: <misc@...>
Date: Sunday, April 27, 2008 - 6:21 pm

I would give PostgreSQL a look, it doesn't get as much press as MySQL,
But it is VERY solid, and it is BSD licensed

Sam Fourman Jr.
To: badeguruji <badeguruji@...>, <misc@...>
Date: Sunday, April 27, 2008 - 7:54 pm

I've also found it much easier to maintain than MySQL.

As far as language, you should look for something that looks "fun" to
you.  Language's are really all over the place, it really depends on
what looks like you are going to want to develop in it.  Perl is
popular as it is on nearly every *nix system in the world (it is also
what the pkg_* tools are written in), Ruby is popular with its Ruby on
Rails web framework (there is a lot more to Ruby than Rails fyi) and
finally Python which is popular and I would recommend.  But what
matters to me may not matter to you.

Take a look at some tutorials and find something that you _want_ to program in.

(Sorry Sam for the spam).


-- 
# Curt Micol
Previous thread: Re: vpn, isakmpd, and X509 certificates by Stuart Henderson on Sunday, April 27, 2008 - 4:57 pm. (1 message)

Next thread: Re: Nvidia Quadro NVS 140M by Stuart Henderson on Sunday, April 27, 2008 - 6:05 pm. (2 messages)
speck-geostationary