Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID
Advertise on LowEndTalk.com

In this Discussion

Getting started with PHP/Web development

Getting started with PHP/Web development

gsrdgrdghdgsrdgrdghd Member without signature
edited October 2012 in Help

Hey everyone

I was recently asked to help a friend making a website (basically a PHP time management/schedule system). My problem is that while i have sufficient experience with desktop development (Java, C, etc) but, apart from modding some things, no experience at all with PHP/HTML/CSS/JS.

So i've been looking for some frameworks/best practices/etc to get started with this project. It appears that it would be the easiest thing to use Bootstrap for all the design stuff and some PHP framework for the coding (although i don't even know what PHP frameworks exactly do). A quick Google search gave me Yii+Bootstrap which looks fine on the first glance. Can anyone comment on it or suggest better alternatives? Also are there some good ressources for "getting started with PHP" (not in the sense of learning for loops but in the sense of differences in comparison to desktop development)? And what are good IDEs?

Thanks for any help in advance

Tagged:

Comments

  • I use NetBeans IDE for PHP Development, that's about all I can help you with, havent got any resources for you to learn, but maybe a flick through some of the CodeCademy stuff that's more intermediate / advanced may assist you.

  • jcalebjcaleb Moderator

    For IDE, anything that displays with different colors to highlight syntax. But I just default to Eclipse, it has a PHP distribution.

    For framework, I suggest Code Igniter as the learning curve is not that steep. For database framework, maybe use RedBean. It's so easy. If also okay with you, you can also consider not using a web framework and just use plain PHP with directories and includes and whatnot. With RedBean of course, that will save you time.

    I like bootstrap. I also like jquery easy ui www.jeasyui.com

  • bnmklbnmkl Member
    edited October 2012

    @gsrdgrdghd: Yii+Bootstrap looks good. It's nice to have the raw HTML extracted from your PHP code. For the icing on the cake, you could also use CodeIgniter as @jcaleb mentioned for your routing etc and some nice libraries.

    For instance, then example.com/myclass/myfunc/hello-world would access:

    <?php
    
        class myclass extends example
        {
            function myfunc(param)
            {
                if( $param == "hello-world" ) echo $param;
            }
        }
    
    ?>
    

    But I agree with @eastonch, & there are probably loads of open-source time management/schedule system applications already you could just modify depending on what they require; uniqueness etc.

    -

  • http://www.php.net/manual/en/language.oop5.basic.php http://php.net/manual/en/book.pdo.php (+ prepared statements) http://www.smarty.net/ http://stackoverflow.com/questions/tagged/php (use it like google) http://net.tutsplus.com/category/tutorials/php/ (lot's of content on popular frameworks)

    and I personally use netbeans. upload on save is the bee's knees.

  • joepie91joepie91 Member
    edited October 2012

    @AsadHaider said: Don't forget http://www.phptherightway.com/ has some nice "guidelines"

    With the footnote that, despite the deceptive naming, it's not the "right way", but the way the creator of the site prefers.

    EDIT: Also, stay far away from bcrypt. It has a practically undocumented character limit and silently discards everything that exceeds it. Do. Not. Use. It. There are plenty of safe alternatives.

    Appreciate my posts/software/guides? Donate (PayPal/Flattr/Bitcoin): http://cryto.net/~joepie91/donate.html | irc.freenode.net #lowendbox

  • @joepie91 said: EDIT: Also, stay far away from bcrypt. It has a practically undocumented character limit and silently discards everything that exceeds it. Do. Not. Use. It. There are plenty of safe alternatives.

    A 72 character limit. If someone needs a 100 character password to feel "safe", then tough luck on any of my sites ;)

  • @telephone said: A 72 character limit.

    More around 50 or so, for PHP.

    @telephone said: If someone needs a 100 character password to feel "safe", then tough luck on any of my sites ;)

    Never thought of people using passphrases instead of passwords?

    Appreciate my posts/software/guides? Donate (PayPal/Flattr/Bitcoin): http://cryto.net/~joepie91/donate.html | irc.freenode.net #lowendbox

  • @joepie91 said: More around 50 or so, for PHP.

    This is a crude example but: http://codepad.viper-7.com/DQqY7g

    @joepie91 said: Never thought of people using passphrases instead of passwords?

    You're still able to use passphrases, but only the first 72 characters will be used in the creation of the hash.

  • @telephone said: This is a crude example but: http://codepad.viper-7.com/DQqY7g

    I'm talking about the native implementation of bcrypt via crypt().

    @telephone said: You're still able to use passphrases, but only the first 72 characters will be used in the creation of the hash.

    Which makes it far less secure. After the first 72 (or other amount) of characters it doesn't matter what you enter.

    I see no valid reason to use bcrypt and introduce an unnecessary character limit, when there are various alternatives that are equally secure.

    Appreciate my posts/software/guides? Donate (PayPal/Flattr/Bitcoin): http://cryto.net/~joepie91/donate.html | irc.freenode.net #lowendbox

  • @joepie91, What would you advise as a bcrypt alternative? Is it only the password length that is the issue? I like password generators; I would prefer to use generated 128 passwords than keys, as keys can be hassle sometimes. It's also annoying how any should have any character limit at all.

    -

  • jcalebjcaleb Moderator

    @gsrdgrdghd said: but, apart from modding some things, no experience at all with PHP/HTML/CSS/JS.

    another tip, don't design your code on how you do desktop app. you have to think differently. otherwise, your problems will pile up

  • @bnmkl said: @joepie91, What would you advise as a bcrypt alternative? Is it only the password length that is the issue? I like password generators; I would prefer to use generated 128 passwords than keys, as keys can be hassle sometimes. It's also annoying how any should have any character limit at all.

    SHA256/SHA512 (with a few thousand rounds), Scrypt (GPU-hostile), ...

    Appreciate my posts/software/guides? Donate (PayPal/Flattr/Bitcoin): http://cryto.net/~joepie91/donate.html | irc.freenode.net #lowendbox

  • AsadHaiderAsadHaider Member
    edited October 2012

    @joepie91 said: With the footnote that, despite the deceptive naming, it's not the "right way", but the way the creator of the site prefers.

    Ya, that's why I said "guidelines" but that probably wasn't the best word to use :P

    It does have a few good best practices though for new users. That's why I suggested it.

  • gsrdgrdghdgsrdgrdghd Member without signature

    Thanks everyone for the suggestions. I think i'll stick to Yii+Bootstrap (since it seems rather simple and clean)

    @jcaleb said: another tip, don't design your code on how you do desktop app. you have to think differently. otherwise, your problems will pile up

    In what way do i need to design my code differently? So far all the frameworks i've found seem to use the MVC pattern which is rather similar to desktop development.

  • jcalebjcaleb Moderator

    @gsrdgrdghd said: In what way do i need to design my code differently? So far all the frameworks i've found seem to use the MVC pattern which is rather similar to desktop development.

    it's common for desktop developers to code in stateful manner. thats one way.

    Thanked by 1djvdorp
  • gsrdgrdghdgsrdgrdghd Member without signature

    Ah ok. I've noticed the same difference when coding an Android app (and didn't really like it) :D

  • jcalebjcaleb Moderator

    @gsrdgrdghd said: Ah ok. I've noticed the same difference when coding an Android app (and didn't really like it) :D

    There are many subtle differences. But if you are following examples you are okay. In some companies I've worked with (e.g. background is Delphi, or Oracle Forms), they tend to bend how web usually works and they write their own framework code such that they code the same way they code in Delphi or Oracle Forms.

  • gsrdgrdghdgsrdgrdghd Member without signature

    That would actually be a nice thing to do, someone needs to publish such a framework :D

    After having tried using Yii and some other frameworks i'm really overwhelmed with the complexity.

    Isn't there some really basic framework that just lets me create a .php file for each page and provides some simple things like layout (header, footer, menubar) and database connectivity?

  • joepie91joepie91 Member
    edited October 2012

    @gsrdgrdghd said: Isn't there some really basic framework that just lets me create a .php file for each page and provides some simple things like layout (header, footer, menubar) and database connectivity?

    That would be PHP itself :)

    require(), PDO, and the rest of the PHP standard library are all you need for that. You don't need a framework to work with PHP.

    Appreciate my posts/software/guides? Donate (PayPal/Flattr/Bitcoin): http://cryto.net/~joepie91/donate.html | irc.freenode.net #lowendbox

    Thanked by 1telephone
  • Take a look at laravel ...

  • gsrdgrdghdgsrdgrdghd Member without signature

    @joepie91 said: That would be PHP itself :)

    I'm aware of that option but i guess it will just require even more work.

    I feel like there needs to be a better/easier solution to create a basic website than mixing 2 programming languages, 3 markup languages, 1 query langauge and thousands of incompatible 3rd party tools, all shattered and lumped together over hundreds of files.

    @completegibbon said: laravel

    Thank i'll take a look at it.

  • @gsrdgrdghd said: I'm aware of that option but i guess it will just require even more work.

    I feel like there needs to be a better/easier solution to create a basic website than mixing 2 programming languages, 3 markup languages, 1 query langauge and thousands of incompatible 3rd party tools, all shattered and lumped together over hundreds of files.

    I'm not sure what you're refering to...

    You have one server-side language (PHP) without any fancy stuff tacked onto it. You include() a header and a footer on each page. You use SQL, which is (and should be!) a separate layer to retrieve stuff from the database.

    You have one client-side markup language (HTML), along with CSS and Javascript where necessary.

    How is what I suggested unnecessarily complex, where do the 'thousands of incompatible 3rd party tools' come from (I'm not even sure what you mean with it), and how are the above components not present when working with a framework?

    Appreciate my posts/software/guides? Donate (PayPal/Flattr/Bitcoin): http://cryto.net/~joepie91/donate.html | irc.freenode.net #lowendbox

    Thanked by 1ihatetonyy
  • gsrdgrdghdgsrdgrdghd Member without signature

    @joepie91 said: I'm not sure what you're refering to...

    2 programming languages: PHP, JS 3 Markup languages: HTML, CSS, (LESS) one query language: SQL

    @joepie91 said: How is what I suggested unnecessarily complex, where do the 'thousands of incompatible 3rd party tools' come from

    Sorry for the confusion, i wasn't refering to your suggestion. I meant all the premade frameworks with unnecessary much complexity. But i'll try the approach you suggested now

  • For easy to learned framework, you should try code igniter. Its user guide is awesome and easy to follow..

  • @gsrdgrdghd said: 2 programming languages: PHP, JS 3 Markup languages: HTML, CSS, (LESS) one query language: SQL

    welcome to web development.

  • My friends like CakePHP, I personally haven't tried it though but you can have a look at that also. I've heard about code igniter but never used it either. Personally, I recently discovered that dreamweaver has a little file manager that can use SFTP. Ever since, I've been coding from one app and creating my own little bootstraps. I've noticed extremely good performance doing this since the code is much much less (neither bloated) and might help keep your LEBs out of major load problems.

    Risharde.com - I AM THE FUTURE
Sign In or Register to comment.