1. Post #1081
    Gold Member
    spidersdesign's Avatar
    September 2010
    440 Posts
    This is a great PHP framework: http://laravel.com/3
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Informative Informative x 1Agree Agree x 1 (list)

  2. Post #1082
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    why would you use php though

    Edited:

    serious question. what does PHP offer besides the abundance of cheap and nasty shared hosting?
    Reply With Quote Edit / Delete Mac Australia Show Events Agree Agree x 3 (list)

  3. Post #1083
    Pass along
    commander204's Avatar
    May 2008
    4,065 Posts
    why would you use php though

    Edited:

    serious question. what does PHP offer besides the abundance of cheap and nasty shared hosting?
    I use it for the C Style coding
    Reply With Quote Edit / Delete Windows 7 France Show Events Dumb Dumb x 1 (list)

  4. Post #1084
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    I use it for the C Style coding
    that is not a valid reason

    Edited:

    mainly because the only thing that's 'c-style' about php is { and }
    Reply With Quote Edit / Delete Mac Australia Show Events Agree Agree x 2Dumb Dumb x 1 (list)

  5. Post #1085
    Pass along
    commander204's Avatar
    May 2008
    4,065 Posts
    that is not a valid reason

    Edited:

    mainly because the only thing that's 'c-style' about php is { and }
    How is personal preference not a valid reason? In the end I will still use it, just because I know it and get things done in it.
    Reply With Quote Edit / Delete Windows 7 France Show Events

  6. Post #1086
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    my guess is that you only prefer it because you haven't tried anything better
    Reply With Quote Edit / Delete Mac Australia Show Events Agree Agree x 4Disagree Disagree x 1 (list)

  7. Post #1087
    Dennab
    February 2012
    2,299 Posts
    So... its definitely worth installing a ruby interpreter onto my server and having a play around with it?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  8. Post #1088
    Gold Member
    jaybuz's Avatar
    May 2006
    5,516 Posts
    PHP is alright for simple shit no doubt but anything more and you're just making more work for yourself. Fishsticks
    Reply With Quote Edit / Delete United Kingdom Show Events Agree Agree x 2 (list)

  9. Post #1089
    Dragon Member
    Dragory's Avatar
    January 2006
    1,312 Posts
    Each time there's an argument about PHP here no one comes up with anything major that's better in Ruby or worse in PHP, or why one should switch.
    I've been thinking of trying Ruby myself, but I don't really see why PHP would be bad for even big projects. Something about every page load being an "instance of its own"?
    Reply With Quote Edit / Delete Windows 7 Finland Show Events Agree Agree x 1 (list)

  10. Post #1090
    Gold Member
    Crhem van der B's Avatar
    January 2010
    1,692 Posts
    my guess is that you only prefer it because you haven't tried anything better
    I tried Python and C# ASP.NET and I still use PHP. I guess your explanation for that is that I'm a total idiot?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1 (list)

  11. Post #1091
    ToNi's Avatar
    March 2010
    102 Posts
    Working on a webadmin system for a gaming community.

    Reply With Quote Edit / Delete Windows 7 Hungary Show Events Informative Informative x 1 (list)

  12. Post #1092
    Gold Member
    Catdaemon's Avatar
    February 2005
    2,821 Posts
    Each time there's an argument about PHP here no one comes up with anything major that's better in Ruby or worse in PHP, or why one should switch.
    I've been thinking of trying Ruby myself, but I don't really see why PHP would be bad for even big projects. Something about every page load being an "instance of its own"?
    There are various platforms you can use for PHP, not all of them spawn an instance per page.

    Mainly it's the whole "USE LINUX IT'S BETTER" thing. People find a cool new thing they like (in this case RoR) and then inform everyone that they should be using it. Notice how no PHP developers are telling people to stop using Ruby. That's not because Ruby is better, but because the PHP developers don't give a fuck and continue to use the tools that work for them.


    PHP is alright for simple shit no doubt but anything more and you're just making more work for yourself. Fishsticks
    I've worked with both and I can't say that's true. Ruby does some easy stuff for you but that's negated by its retard-tier toolchain.
    Reply With Quote Edit / Delete Windows 7 Show Events Agree Agree x 2Informative Informative x 1 (list)

  13. Post #1093
    I tried Python and C# ASP.NET and I still use PHP. I guess your explanation for that is that I'm a total idiot?
    Yes, because you haven't tried ruby :3
    Reply With Quote Edit / Delete Mac United States Show Events Funny Funny x 4Winner Winner x 1Agree Agree x 1 (list)

  14. Post #1094
    adamjon858's Avatar
    July 2007
    1,282 Posts
    And did you try a Python framework?
    Reply With Quote Edit / Delete Mac United States Show Events

  15. Post #1095
    Gold Member
    Crhem van der B's Avatar
    January 2010
    1,692 Posts
    I tried that Google AppEngine thingy, which was recommended here as "an ok start if you're completely new to Python's web related stuff" (not an actual quote).
    Reply With Quote Edit / Delete Windows 7 United States Show Events Dumb Dumb x 1 (list)

  16. Post #1096
    Gold Member
    Dennab
    January 2012
    1,137 Posts
    I tried that Google AppEngine thingy, which was recommended here as "an ok start if you're completely new to Python's web related stuff" (not an actual quote).
    Heroku can host python apps now IIRC, they seem pretty interesting, I tried deploying a ruby app the other day and it was pretty no-fuss

    Edited:

    In all honesty though, you should give ruby a try (either rails or sinatra). It's fucking fantastic and good for everything from a small automation script to a large website. And it manages to keep all that ability while still managing a beautiful and painless development experience, true coding zen.
    Reply With Quote Edit / Delete Mac United States Show Events

  17. Post #1097
    Dotmister's Avatar
    May 2008
    898 Posts
    I find the main difference between using PHP and other frameworks (and therefore generally languages) is that with PHP it's much more of a procedural programming task. You write everything from being passed the request to apache, to sending the response.

    With other frameworks quite a lot of the work parsing what page to dispatch the request to etc is handled behind your back, so if you're new to the framework it's hard to get an idea of how everything works. This is especially true of things like Google Apps.


    why would you use php though

    Edited:

    serious question. what does PHP offer besides the abundance of cheap and nasty shared hosting?
    PHP is so easy to pick up and mess about with, there's no prior experience with the language required at all really.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  18. Post #1098
    The learning curve is so completely worth it though.
    Reply With Quote Edit / Delete Mac United States Show Events

  19. Post #1099
    Unmetered VPS
    Fizzadar's Avatar
    June 2010
    1,247 Posts
    Just finished writing a quick & dirty php daemon class (makes use of: http://blog.motane.lu/2009/01/02/mul...ding-in-php/):

    <?php
    	/*
    		file: app/lib/daemon.php
    		desc: daemon class
    	*/
    	
    	class mod_daemon {
    		private $jobs = array();
    		private $threads = array();
    		private $dbfunc;
    		private $threadfunc;
    		private $maxthreads;
    		private $threadtime;
    		private $dbupdate;
    
    		//construct
    		public function __construct( $dbfunc, $threadfunc, $maxthreads = 10, $threadtime = 60, $dbupdate = 300 ) {
    			$this->dbfunc = $dbfunc;
    			$this->threadfunc = $threadfunc;
    			$this->maxthreads = $maxthreads;
    			$this->threadtime = $threadtime;
    			$this->dbupdate = $dbupdate;
    		}
    
    		public function start() {
    			//threads array & counter
    			$threadcount = 0;
    			//db update time
    			$dbtime = $this->dbupdate;
    
    			//loop time
    			while( true ):
    				//get new jobs
    				if( count( $this->jobs ) <= 0 and $dbtime > $this->dbupdate ):
    					//get jobs
    					$j = call_user_func( $this->dbfunc );
    					foreach( $j as $job ):
    						$this->jobs[] = $job;
    					endforeach;
    					//reset db timer
    					$dbtime = 0;
    				endif;
    
    				//add threads until max reached
    				while( count( $this->threads ) < $this->maxthreads and count( $this->jobs ) > 0 ):
    					//get our job
    					reset( $this->jobs );
    					$key = key( $this->jobs );
    
    					//create thread
    					$this->threads[$threadcount] = array(
    						'thread' => new Thread( 'update' ),
    						'time' => 0,
    						'job' => $key
    					);
    
    					//start thread
    					$this->threads[$threadcount]['thread']->start( $this->jobs[$key] );
    					echo 'new thread spawned: #' . $threadcount . PHP_EOL;
    					$threadcount++;
    
    					//remove from job queue
    					unset( $this->jobs[$key] );
    				endwhile;
    
    				//loop all current threads, check if dead
    				foreach( $this->threads as $key => $thread ):
    					//update thread timer
    					$this->threads[$key]['time']++;
    
    					//thread dead?
    					if( !$thread['thread']->isAlive() ):
    						unset( $this->threads[$key] );
    						echo 'thread stopped: #' . $key . PHP_EOL;
    					endif;
    
    					//thread over times timer?
    					if( $thread['time'] > $this->threadtime ):
    						$thread['thread']->stop();
    						unset( $this->threads[$key] );
    						echo 'thread force-stopped: #' . $key . PHP_EOL;
    					endif;
    				endforeach;
    
    				//end, sleep, update timers
    				sleep( 1 );
    				$dbtime++;
    			endwhile;
    		}
    	}
    ?>
    

    Edited:

    why would you use php though

    Edited:

    serious question. what does PHP offer besides the abundance of cheap and nasty shared hosting?
    The best documentation & support.

    True, a lot of the tutorials are poorly written/etc, but the reason PHP is so popular (and will continue to be) is because it's so insanely popular. And it can be surprisingly powerful (albeit sometimes slow).
    Reply With Quote Edit / Delete Mac Canada Show Events Disagree Disagree x 1Agree Agree x 1 (list)

  20. Post #1100
    The best documentation & support.

    True, a lot of the tutorials are poorly written/etc, but the reason PHP is so popular (and will continue to be) is because it's so insanely popular. And it can be surprisingly powerful (albeit sometimes slow).
    http://guides.rubyonrails.org/
    http://api.rubyonrails.org/
    http://ruby.railstutorial.org/ruby-o...ok?version=3.2
    Reply With Quote Edit / Delete Mac United States Show Events Agree Agree x 2 (list)

  21. Post #1101
    Neo-Claw's Avatar
    November 2011
    31 Posts
    Currently I'm working on 2 web projects: HackTech Online and SellMyCode.
    HackTech is an online hacker simulation game, and SellMyCode is a website where you can buy and sell source code for software :)

    SellMyCode:


    HackTech Online:
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events Informative Informative x 1 (list)

  22. Post #1102
    Gold Member
    StinkyJoe's Avatar
    June 2006
    2,196 Posts
    There are various platforms you can use for PHP, not all of them spawn an instance per page.

    Mainly it's the whole "USE LINUX IT'S BETTER" thing. People find a cool new thing they like (in this case RoR) and then inform everyone that they should be using it. Notice how no PHP developers are telling people to stop using Ruby. That's not because Ruby is better, but because the PHP developers don't give a fuck and continue to use the tools that work for them.




    I've worked with both and I can't say that's true. Ruby does some easy stuff for you but that's negated by its retard-tier toolchain.
    I work with PHP every single day, on some very very large and expensive (read: millions) platforms. I'm also in the process of getting my Zend Certified Engineer certification. It works, it does its job, but it also requires a ton of extra work and bullshit on the side to keep it running smoothly, the inconsistent syntax and built-in libraries, glaring bugs and imaginative haphazardly-implemented features are grating on the developers, often holding them back with little ridiculous and nonsensical bullshit that wouldn't fly in the dozens of other common languages.

    Do I like PHP? Yes, I have a ton of fun writing PHP myself. Do I recommend it? Not anymore, no. Even the common learning-curve argument has gone out the door - shared host support plays a big part, no doubt, but besides that there's very little on PHP's side in that aspect.

    Is there a market for PHP? Yes, and for experienced developers its bound to get more profitable in the long-term. That said, you'll be stuck in a niche-market duct-taping legacy applications.

    Is PHP good for you as a programmer? No, if you're a beginner, you'll come out the other end with bad habits and a very limited mindset (I'm still trying to fix that in some aspects, PHP being the first language I seriously worked with); if you're already experienced, you'll want to claw your face out.

    Should you learn PHP eventually, if you don't already? It's useful for very quick and dirty scripts, much like you should learn perl or python for those quick scripts where bash doesn't cut it.

    What does the PHP library environment look like? It's absolutely depressing, specially when you put it alongside ruby's, python's or javascript/node's.

    What does the future hold for PHP? An increasingly enterprisey and misguided language, which is a shame considering PHP's best asset was being a decent hackety-hack tool for the web.


    tl;dr: Save your time and energy, invest in a modern language that's healthy for you, become a better programmer in the process.

    Edited:

    The best documentation & support.

    True, a lot of the tutorials are poorly written/etc, but the reason PHP is so popular (and will continue to be) is because it's so insanely popular. And it can be surprisingly powerful (albeit sometimes slow).

    PHP has the most documentation (don't quote me on that), but the signal-to-noise ratio is abysmal. Even the official documentation is often incomplete and peppered with gems like:

    do_something ( void )
    function to do something

    Unofficial documentation/tutorials are more often than not uninformed or down-right ridiculous. And powerful? Of all the common languages we throw around, it's by far the most limited.
    Reply With Quote Edit / Delete Windows 7 Portugal Show Events Winner Winner x 3Useful Useful x 3Agree Agree x 2 (list)

  23. Post #1103
    We're Born Under the Northern Lights
    Skorpy's Avatar
    July 2005
    1,901 Posts
    I tried that Google AppEngine thingy, which was recommended here as "an ok start if you're completely new to Python's web related stuff" (not an actual quote).
    Google AppEngine uses web.py which really is pretty damn simple.
    I still prefer Django. I find it much better.
    Reply With Quote Edit / Delete Linux Finland Show Events

  24. Post #1104
    Dragon Member
    Dragory's Avatar
    January 2006
    1,312 Posts
    Let's say I wanted to try using Ruby for web development - where would I start? Do I need a framework such as RoR or what? I tried Googling about it, but most of the resources talk about RoR - I guess I should try that, then?

    EDIT: Wait, why am I asking this here and not the question thread... oh well.
    Reply With Quote Edit / Delete Windows 7 Finland Show Events

  25. Post #1105
    Gold Member
    toaster468's Avatar
    January 2010
    3,260 Posts
    Let's say I wanted to try using Ruby for web development - where would I start? Do I need a framework such as RoR or what? I tried Googling about it, but most of the resources talk about RoR - I guess I should try that, then?

    EDIT: Wait, why am I asking this here and not the question thread... oh well.
    RoR is a framework for web apps. You can download it here or alternatively (my host and probably others) webhosters offer RoR already just check around your cPanel.

    For starting I really liked http://railsforzombies.org/ they take you through the creation of a micro-blogging website (iirc), they have a video part and at the end they have a test console and they ask you to solve problems based on the lesson (One part was getting all the users or something from an array, again iirc, I took it a while ago)

    Also ruby is it's own language, RoR as noted above is only a framework.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 1 (list)

  26. Post #1106
    Dragon Member
    Dragory's Avatar
    January 2006
    1,312 Posts
    RoR is a framework for web apps. You can download it here or alternatively (my host and probably others) webhosters offer RoR already just check around your cPanel.

    For starting I really liked http://railsforzombies.org/ they take you through the creation of a micro-blogging website (iirc), they have a video part and at the end they have a test console and they ask you to solve problems based on the lesson (One part was getting all the users or something from an array, again iirc, I took it a while ago)

    Also ruby is it's own language, RoR as noted above is only a framework.
    Alright, thanks. I was just a bit confused, as PHP can easily be installed as it is so that web servers such as Apache can utilize it. Wasn't sure how it works with Ruby.
    Reply With Quote Edit / Delete Windows 7 Finland Show Events

  27. Post #1107
    Gold Member
    ManningQB18's Avatar
    April 2009
    9,855 Posts


    I've ditched the unnecessary borders and backgrounds and warmed it up a little.
    I think it looks better, but there is still something little off.
    Can I have that background image? It looks really nice.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 1 (list)

  28. Post #1108
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    Alright, thanks. I was just a bit confused, as PHP can easily be installed as it is so that web servers such as Apache can utilize it. Wasn't sure how it works with Ruby.
    I use phusion passenger which makes deploying any rack based app as easy as deploying php.
    Reply With Quote Edit / Delete Australia Show Events Agree Agree x 2Friendly Friendly x 1Funny Funny x 1 (list)

  29. Post #1109
    secretly a furry
    Jelly's Avatar
    April 2011
    2,023 Posts
    I use phusion passenger which makes deploying any rack based app as easy as deploying php.
    What a terrible website.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Disagree Disagree x 4Agree Agree x 2 (list)

  30. Post #1110
    Gold Member
    Dennab
    January 2012
    1,137 Posts
    What a terrible website.
    The only bad part is the logo

    Edited:

    Working on my first rubygem, it pulls data from Google Play (using nokogiri). I've got no idea what the fuck I'm doing but check out this Awesome Print dump
    Reply With Quote Edit / Delete Mac United States Show Events Funny Funny x 3 (list)

  31. Post #1111
    italian
    TerabyteS_'s Avatar
    June 2011
    2,645 Posts
    I see this thread turning into a Ruby development discussion thread in the near future
    Reply With Quote Edit / Delete Windows Vista Anonymous Proxy Show Events Agree Agree x 5Informative Informative x 1Disagree Disagree x 1 (list)

  32. Post #1112
    DevBug's Avatar
    July 2010
    1,059 Posts


    My first real design -> working site. Suggestions?
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Programming King Programming King x 1Disagree Disagree x 1 (list)

  33. Post #1113
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    needs more bootstrap
    Reply With Quote Edit / Delete Mac Australia Show Events Funny Funny x 8 (list)

  34. Post #1114
    Dennab
    February 2012
    2,299 Posts
    Can I have that background image? It looks really nice.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Friendly Friendly x 1 (list)

  35. Post #1115
    secretly a furry
    Jelly's Avatar
    April 2011
    2,023 Posts
    I see this thread turning into a Ruby development discussion thread in the near future
    Yeah, only because the Ruby fanatics would have driven everyone else out.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Agree Agree x 5 (list)

  36. Post #1116
    Gold Member
    jaybuz's Avatar
    May 2006
    5,516 Posts
    Docs are my bible.
    Reply With Quote Edit / Delete United Kingdom Show Events

  37. Post #1117
    adamjon858's Avatar
    July 2007
    1,282 Posts
    I am the doc
    Reply With Quote Edit / Delete Mac United States Show Events Friendly Friendly x 1Disagree Disagree x 1 (list)

  38. Post #1118
    italian
    TerabyteS_'s Avatar
    June 2011
    2,645 Posts


    ITALIAN GIBBERISH
    Reply With Quote Edit / Delete Windows 7 Anonymous Proxy Show Events Artistic Artistic x 4Agree Agree x 1 (list)

  39. Post #1119
    I paid $2 for this
    Miljaker's Avatar
    October 2010
    791 Posts
    Making a site for a local bed and breakfast. Anyone got any suggestions on what font to use?

    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Artistic Artistic x 1 (list)

  40. Post #1120
    Gold Member
    jaybuz's Avatar
    May 2006
    5,516 Posts
    Try blurring the background photo a bit. It's a little busy in the middle and that makes it hard to read the text.

    You could try changing the white background for the sidebar instead of using a line to separate it, and add more padding to it.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 3Informative Informative x 1 (list)