# Questions to webapplications



## bsus (Oct 4, 2011)

Hi,
I want to go first steps into the "web-area".
I have to sorts of webapplication which I want to be able to develope.

1. Webapp which makes it possible to administrate unix-machines like zfsguru.

2. Webapp which manages data, as example: A webapp which controls monthly cash-flow (rent, power, oil...)

I think both should be realisable over an Apache MySQL PHP construction, but I heared there should also be "better" ways. As example with Python instead of PHP => Inkoya

So which way is the "best" to realise both "Projects"?

Regards,
bsus


----------



## olav (Oct 4, 2011)

IMHO PHP is a html template language. It's hard to read and has some weird quirks like array[0] and array['0'] is the same key.

With Python you don't really need apache or another normal web server. Python is also often installed by default on several Linux distributions.

When it comes to Python2 vs Python3 I really have no idea. I use Python2 because I really like the Flask micro web framework.


----------



## bsus (Oct 4, 2011)

That because I ask, PHP is really something for itself. But it has to be a webapp something which generates answers on the server which you can see over the browser

Regards


----------



## Carpetsmoker (Oct 4, 2011)

You can use either PHP or Python ... Or Ruby, Perl, JSP, ASP, etc. There are many many comparisons on the internet. Use google.

Choose one and stick with it, and if you don't like it try another. Or when you got a new project, use Python if you went with PHP the first time or vice versa ...

Really, the best way is to learn & try for yourself. If you're new, buy a (good!) book on the language, it makes all the difference.


----------



## stevenu (Oct 5, 2011)

*Question 2*

bsus,

The answer to your question 2 might be nuBuilder.
Its based on MySQL and PHP using Apache.

(think MS Access, but open source, web based and faster to develop in)

http://www.nubuilder.com

Steven


----------



## DutchDaemon (Oct 5, 2011)

Is it supported (and known to build, install and run) on FreeBSD? If so, will you put it in the Ports tree? We don't encourage FreeBSD users to install non-ported applications from the net because they usually violate the 'system/application boundary' principle.


----------



## stevenu (Oct 7, 2011)

DutchDaemon, 

Hopefully this answers your questions..

nuBuilder will run on FreeBSD, as it is only PHP files that access a MYSQL database. 

As such, there is no need to "build" or "install" it, just extract the tarball containing
the PHP and SQL files; place the PHP into your webroot and dump the SQL into your database.

What you will need is PHP, Apache, and MySQL already running on your 
FreeBSD machine. The only OS we currently have an installer for is Windows - which sets up a WAMP environment and puts the files where they need to go. 

The reason for this is that it is a non-trivial task to maintain LAMP/FAMP/MAMP installers for all the varieties of "unix" like environments, and users of these systems are generally more savvy than the average Windows user.

So:

*-Does nuBuilder run on FreeBSD?* 
Yes, but you will need to set up your own Apache, MySQL, PHP environment first.

*-Do we have a FreeBSD installer?* 
No. 

*-When you build nuBuilder on FreeBSD does it violate the 'system/application boundary' principle?* 
No, because there is no need to build it.

*-What "port" do FreeBSD users use? *
For all non-Windows users - download the tarball, extract it into the webroot, and upload the .SQL files into MySQL.

Steven


----------



## Carpetsmoker (Oct 7, 2011)

I looked at the nuBuilder website. I tried two demo's, both *required* popups to be enabled, both used about 10 frames, and both looked butt-ugly.
The last one is subjective, the first two are not. If this is how all nuBuilder apps look like, then it seems the nuBuilder people got stuck in 1996...
Oh, and it also requires register_globals to be enabled in PHP ... I didn't look at the code, but this is typically an indication of not-to-great code quality...

I didn't look further, I still need to sleep tonight.

If this doesn't represent nuBuilder accurately, or if you insist on using it anyway, you can just download the "Linux/UNIX" package from their website. It contains an INSTALL file with installation instructions, glancing over it, it should work fine on FreeBSD. It's 100% web-based.


----------



## Carpetsmoker (Oct 7, 2011)

My curiosity got the better of me and I opened a random file (imageuploader.php).

I stopped looking after two SQL injection vulnerabilities and a potential XSS vulnerability. Quite an achievement for a 101 line file (with quite a few empty lines).

I'm not even going to discus the absolutely horrible design.

I would *strongly* recommend *against* using nuBuilder.


----------



## Carpetsmoker (Oct 7, 2011)

Powered by nuBuilder, mwuhaha


```
<div id='Footer' align=center style='overflow:hidden;position:absolute;visibility:visible;top:620;height:20;left:10;width:990'>
<table width='102%'><tr width='100%'><td  width='100%' class='stab' ><a class="blueLink" href="http://www.nubuilder.com" target="_blank">Powered by nuBuilder</a></    +td></tr>
  <tr>
    <td style='background-color:blue' align='left'><img src='css/bluebl.jpg' border='0'/></td>
    <td style='background-color:green' align='right'><img src='css/bluebr.jpg' border='0'/></td>
  </tr>
</table>
</div>

<div id='FooterL' align=center style='overflow:hidden;position:absolute;visibility:visible;top:110;height:530;left:1;width:20'>
<table width='5%'><tr width='100%'><td  width='100%' class='stab' >












































































</td></tr></table>
</div>
<div id='FooterR' align=center style='overflow:hidden;position:absolute;visibility:visible;top:110;height:530;left:975;width:20'>
<table width='5%'><tr width='100%'><td  width='100%' class='stab' >












































































</td></tr></table>
</div>
</form></body></html>
```


----------



## Carpetsmoker (Oct 7, 2011)

And to top it of with the _magnum opus_ in Javascript:


```
var strTwoChr     = new Array();
  strTwoChr[1]      = '01';
  strTwoChr[2]      = '02';
  strTwoChr[3]      = '03';
  strTwoChr[4]      = '04';
  strTwoChr[5]      = '05';
  strTwoChr[6]      = '06';
  strTwoChr[7]      = '07';
  strTwoChr[8]      = '08';
  strTwoChr[9]      = '09';
  strTwoChr[10]     = '10';
  strTwoChr[11]     = '11';
  strTwoChr[12]     = '12';
  strTwoChr[13]     = '13';
  strTwoChr[14]     = '14';
  strTwoChr[15]     = '15';
  strTwoChr[16]     = '16';
  strTwoChr[17]     = '17';
  strTwoChr[18]     = '18';
  strTwoChr[19]     = '19';
  strTwoChr[20]     = '20';
  strTwoChr[21]     = '21';
  strTwoChr[22]     = '22';
  strTwoChr[23]     = '23';
  strTwoChr[24]     = '24';
  strTwoChr[25]     = '25';
  strTwoChr[26]     = '26';
  strTwoChr[27]     = '27';
  strTwoChr[28]     = '28';
  strTwoChr[29]     = '29';
  strTwoChr[30]     = '30';
  strTwoChr[31]     = '31';
```

There's actually a lot more funny/ridiculous code all over the place ... But this is getting a bit Off-Topic


----------



## stevenu (Oct 7, 2011)

Like all software used in production, its more important that it works than its _*Cool*_.

nuBuilder was originally written before AJAX was available thus the frames. This will change but changes need to be prioritised and as it works with HTML 4.01 Strict, that priority is not the highest.

If anyone would like to help with developing nuBuilder, it is open source and it would be welcomed.

Its easy to criticize from the cheap seats.


----------



## DutchDaemon (Oct 8, 2011)

Make a FreeBSD port of it, and you may get help and eyeballs. This is not attracting a crowd, I can assure you. This thread is not the place to start campaigning.

Now, let's get back to OP's original query without pursuing unproductive tangents, thanks.


----------



## Carpetsmoker (Oct 8, 2011)

stevenu said:
			
		

> Like all software used in production, its more important that it works than its _*Cool*_.



That is certainly true, but as it is, there are serious issues with nuBuilder, the most serious of this is a large amount of security problems and a not-so-great overall design making the said security issues very hard to fix. Not wanting to "criticize from cheap seats", I'll send you a PM with some pointers since this is getting really off topic.


----------

