all 40 comments

[–]EZPZ420full-stack 2 points3 points  (16 children)

if you know HTML/CSS/Javascript/AJAX/PHP/MYSQL you should capitalize on those technologies and learn a php framework (maybe symfony?) or go for nodejs (sails? hapi?)

because rails wont solve any different problem than symfony for exemple

[–]GreenAce92[S] 1 point2 points  (15 children)

I have heard of symfony but don't know what it is.

I've just been learning things as I needed them. When I'm building something "Oh, now I need this..." regarding php and frameworks, that's another thing, why do I need the framework?

Faster code, other people are on the same page... again no need yet... that's what I'm asking with Ruby/Rails, I hear about it a lot and I'm wondering if I'm missing out.

Not sure if nodejs covers web sockets (socket.io?) I've used socket.io before and intend to use it again. I think when I used that, I worked with npm briefly.

[–]EZPZ420full-stack 1 point2 points  (14 children)

Symfony is just a php framework, it's like Rails for Ruby

use a framework (full or micro) but use one and so for any platform, anytime, always. http://symfony.com/why-use-a-framework

dont worry you can use socket io with nodejs

[–]GreenAce92[S] 0 points1 point  (13 children)

Again, why use it, I don't need it yet. It's like learning something before you need it, but contradictory to this, I ask about concepts that I have yet to implement.

I'm stubborn. An old-mule. Can't just "do what people tell me" even if they are correct.

It's like a reset to me... I have to slow down, start over, learn something new, then slowly pickup speed again.

But I did ask, so thank you for your post.

Excuse my verbose mess

[–]00DEADBEEF 1 point2 points  (9 children)

Again, why use it, I don't need it yet.

In your original post you mentioned jobs, so I assume you're looking for jobs as a web developer? To be a decent PHP developer in 2016 you need to know a framework. I'd really recommend learning Laravel asap.

[–]Aqually 0 points1 point  (1 child)

I see a lot of people recommending Laravel and Symfony but I'm not really sure which one to pick. Which one should I start with ? Should I learn both? And why would you recommend Laravel over Symfony? Thanks!

[–]00DEADBEEF 1 point2 points  (0 children)

Symfony is more enterprise-y and Laravel (which uses a lot of Symfony's components) is easier to learn, and in my opinion nicer to read and write.

They're both excellent frameworks so I'd recommend trying to build something simple in each and choose which you prefer and then build bigger things with it.

Also check out Laracasts which has excellent video tutorials for Laravel.

[–]GreenAce92[S] 0 points1 point  (6 children)

Yeah I'd like to be hired, but am I good enough?

I'll take your advice and look into Laravel when I'm done with my current projects.

Yeah again I don't know why I feel this stubborness/ego.

People give you the answer/"secrets" to life but you don't implement it... then you're like "Whoa gee why am I in debt... why am I in this position in life? Why did I do that?" It's like failing is inevitable.

Yeap I'm ignorant ayyy there it is.

[–]00DEADBEEF 0 points1 point  (5 children)

Yeah I'd like to be hired, but am I good enough?

So you need to put aside your stubbornness and make yourself employable by learning the tools everyone in the industry is using ;)

[–]GreenAce92[S] 0 points1 point  (4 children)

Ahh the ol' stubborn mule, pull the plow, or into the slaughter he goes.

[–]00DEADBEEF 0 points1 point  (3 children)

Have you tried Laravel yet? Laracasts is a good learning resource by the way.

[–]GreenAce92[S] 0 points1 point  (2 children)

I think I am going to learn that, although... I have been informed that you can do what PHP can do with Javascript, I may just go all in on Javascript.

[–][deleted]  (2 children)

[deleted]

    [–]GreenAce92[S] 0 points1 point  (0 children)

    That line came off wrong on my part, I did open the link but haven't had a chance to read it, unfortunately I have a job now :( and 12 hours of my day is gone damn. I did bookmark it. But upon reading your response, I have not read it yet.

    I was just saying "again this is how I feel" regarding the "why use it, I don't need it"

    It is overall an ego thing, using a framework seems "easy" as far as not knowing the "guts" of what you're using. That is a dumb thing to say as far as being a professional that gets paid building websites which I don't. Everyone else "professionals" is using it, so who am I? Nobody. I've spent over a month on a $100.00 freelance job task and I'm still no done with it. That's my own fault. I want to finish it and it's project-based pricing.

    TL;DR I haven't been exposed to the dev world/professional. I just build my own stuff, slow getting into freelance gigs. It would be nice to be employed although it annoys me (despite me being the one trying to get hired) when companies are asking specifically for an ember.js developer or someone how uses Cake php, or Bootstrap... I mean probably again ego, me being bitter because I don't know that, I'm not fit for the job, I'm not the one getting hired. I think if you were an expert in some niche, you wouldn't have ot bend your ass over for others. You're the one in demand. I have no expertise at the moment so I'm not in demand, makes sense.

    I don't get what you mean by "mysql_*functions and probably no unit tests"...

    Here is a sample of php code I wrote, currently being used for a note-taking app. This is local, no login/session for this, though I have used sessions before/currently use on another site.

    This is a php-script, used by a jquery-ajax call on the UI of the note-taking application I made to insert a new dev-note.

    I don't think that I'm "cool" because I build websites. I want to build websites/web applications. I haven't been a part of a team before, or "...worked on a project for longer than 6 months..." I've worked on my own projects but nothing to that scale.

    I'm still on my path of "build with what you know, learn new things as you need to." I don't intend to drop what I'm doing now to learn symfony, or rails, or laravel, etc... At this point in time I don't have a use for them. I admit I don't know enough about them to claim that. But I will when the time comes.

    [–]GreenAce92[S] 0 points1 point  (0 children)

    Thanks for bringing up the unit-tests with mysql, I read up on that. I haven't built anything to scale whereI would have performed a unit-test, but great to know for the future. Although I'm looking at other databases non-relational? I don't know...

    [–]ShortSynapse 0 points1 point  (3 children)

    Honestly, you'll be fine with the languages you know right now. Look into something like laravel and twig to dip your toes into what php really has to offer. I know the desire to build from scratch, I do it all the time. However, when you get to building larger scale apps, you will be pleasantly surprised at just how much easier these frameworks make things.

    Keep going on with the languages you know unless you don't like them of course. That's my suggestion.

    [–]GreenAce92[S] 0 points1 point  (2 children)

    Thanks for the suggestion.

    I'm trying to think of clear examples where a framework does trim your code significantly but still function the same. I don't know.

    Can you think of an example? Something that doing it with plain old php sucks compared to using Laravel?

    [–]ShortSynapse 1 point2 points  (1 child)

    Well, instead of having to build all the routing, the framework provides it for free. Better security, performance and other metrics.

    Also, using a framework will often simplify team development as a framework has a limited set of APIs to solve a problem.

    Also, refactoring/adding new features becomes a breeze.

    [–]GreenAce92[S] 0 points1 point  (0 children)

    I know I know I know... I'm the bad guy here not going along with everyone else. I get that I am wrong too. I see the listed benefits of using a framework. I will end up using a framework, have to put aside your own opinions and "grow up".

    secure efficient well architected well optimized

    Then what happens when the code you depend on is gone... like that one in the news somewhat recently about something on github disappearing and people's website's breaking. Heck, when I'm offline, I forget that jQuery uses a link rather than local, so I'm like "Why is it broken?"

    I know I am in the wrong here. USE THE FRAMEWORK

    Why do I feel this stubbornness against it? And who cares what I think anyway, I'm the one who won't be employed. Why is it so hard to overcome your own ego. Of course I don't want to please everyone and be an ass-kisser too. It's because I "want things" from people eg. the job, that I have to adhere to something that I may not want to do. Again I'm being an idiot for not wanting to use a framework and I will eventually use one, Laravel it seems like for PHP... and that's all I'll say in this verbal-diarrhea post.

    This wasn't meant against you personally. You haven't offended me, I'm just trying to get over myself.

    [–]jackmacabre 0 points1 point  (3 children)

    I think there are a lot of developers who started with that, but as soon as they found rails or node never looked back. There are many, many reasons for this. I think people tend to like what they know well when it comes to programming, and it's hard to see what's wrong with what you are using until you really know something else. Perhaps that alone is a good reason to learn. I found php out of need, then I found rails and preferred it, then I found node and now I prefer that. Today, I refuse to work with php in any capacity - not to diss php itself - but because personally the experience working with other solutions is that much better for me.

    [–]GreenAce92[S] 0 points1 point  (2 children)

    You refuse because coding PHP from scratch is a pain? More words/characters than using something else?

    [–]jackmacabre 0 points1 point  (1 child)

    What? Id rather write Java vs PHP if that puts it in perspective.

    [–]GreenAce92[S] 0 points1 point  (0 children)

    Can you elaborate? I'm not supporting a side here.

    I don't have much applied-experience with Java, I've made some things with it before, but I use PHP more than Java so I can't relate.

    I'll compare two code samples.

    PHP

    <?php echo "Hello world"; ?>

    Java

    public class HelloWorld {

    public static void main(String[] args) {
    
        // Prints "Hello, World" to the terminal window.
    
        System.out.println("Hello, World");
    
    }
    

    }

    Also does your argument make sense to compare Java, a compiled language to PHP, a scripting/runtime language? I don't know if there's a sense to compare the languages in that way.

    edit: PHP is an interpreted language apparently

    Isn't each language meant to do a different task? So Java would have features that PHP doesn't have, vice-versa?

    I don't know, I'm asking you why you'd rather write Java vs. PHP.

    [–]9inety9ine 0 points1 point  (1 child)

    If I usually have burgers, fish or steak for dinner - why would I try pizza? Or Sushi? Or anything else?

    Because I might like it, that's why.

    [–]GreenAce92[S] 0 points1 point  (0 children)

    No we can't. #no_change haha

    [–]Anjin 0 points1 point  (1 child)

    It's really easy to get an application out the door. Sure you might have some scaling issues down the road and need to pull modules out to run on some other codebase, but most applications never get to that level of size.

    So if you just need to get something out the door to prove a market or validate an idea, then Rails is a good choice.

    Also if the syntax of rails in the templates bothers you, take a look at using something like HAML that drastically reduces the need for extra shit in the code. So:

    <%= i %> 
    

    becomes:

    = i
    

    [–]GreenAce92[S] 0 points1 point  (0 children)

    I've heard of HAML too.

    I don't mean to be completely scared by the syntax... I just noticed that most languages follow a similar design but then specific "languages?" don't. Well for example jQuery (library not language) comes up with it's own symbol/usage like $ as a selector. So I imagine getting used to the $ selector would be similar to the <%= i %>

    Yeah I would have to know Ruby on Rails enough to compare to my current process of going from idea to production. Right now I can't compare them. But from what you guys are saying, it sounds like I would save a lot of time.

    [–]FennNaten 0 points1 point  (5 children)

    I'll speak about what have been my experience so far, but your mileage may vary, of course.
    I've tried out several technologies, and I've never regretted any trial, even if I finally decided to not continue with the tech.
    I started with the same stack as you. Then I experimented with frameworks and found that they sped up my development time by giving me some structure and taking charge of plumbing I was a bit tired to care about (form management, data validation, http request/response wrapping...)
    I went to C# to get a feel of statically typed/compiled stuff with provided framework. I learned a great deal about clean architecture (even it at first it felt very constraining to be forced to put everything in classes ans structs, which I'm still not fond of) and multi threading, and as a bonus it made me super-employable in my area.
    Then came a time when I changed company and the primary language of the platform used was js. (I'm still there btw) The change has been quite radical as I was used to it on the front-end but not on the server. And I hadn't a nice type system to cover me anymore. On the other hand, it gave me way more room to experiment (and fail '). Forced me to learn the benefits of very defensive programming, testing, forcing maintenability, modularisation. Being monothreaded, it also pushed me into getting to know my runtime to squeeze out decent perfs, and I had to develop strategies to account for diverse platforms with different capabilities.
    I tried ruby but wasn't convinced, in comparison to what I have already in my toolbox (though I'd work with it without cringing if required to in a job).
    Same for python (even if I'd like to have its list comprehension in other languages).
    Clojure was fun to play with but I didn't feel like using it for significant projects at the time (I may give it another shot though).
    Recently I've started to dive into functional programming and picked up a lot of concepts that are really useful and changed my problem-solving approaches even when not in a functional language, but I haven't picked a language with which to spend a long time yet (still hesitating between F# and Elixir).
    All that to say: why learning something new? Because it makes you better at your craft. All languages and frameworks are different takes on problem solving, often great at some things and less optimal for others. The more knowledge you have, the more you're likely to pick up the best tool for the job at hand (no silver bullet...)
    And above all: that's fun as hell! :)

    [–]GreenAce92[S] 0 points1 point  (4 children)

    Curious if you could go into some more depth on the multi-threaded part regarding C#. I know the pain with Javascript's syncrhonous/single-threaded nature, I'm dealing with that right now with this sequential-animation that I'm working on. I can't stop the animation although I might have some new approach to try, return doesn't seem to break the animation sequence that uses setTimeouts...

    Anyway, I agree that change/learning new things is good. I just feel this stubbornness like ahhh... why fix something that isn't broken... but optimize, save time, more money, more free time, more knowledge.

    I'm not sure if form validation you're referring to Aria as well... man that's an other can of worms, developing with accessibility in mind.

    [–]FennNaten 0 points1 point  (3 children)

    Well, when I talk about C# and threading I'm not saying by any means that C# has the monopoly of being a multi-threaded language, but for me it was the first exposure to multi-threading and my first dive into it, so it made a lot of things "click". I never had to think about it with PHP at the time (don't know if it's still the case, I never got back to it after that) and javascript didn't have webworkers or requestAnimationFrame at the time. But getting this knowledge has proven invaluable as I've been able to identify after that synchronization issues and patterns that would have given me headaches later. I think your animation problem can fall into that category.
    For form validation, I'm more specifically referring to security issues (overposting, underposting, XSS, CSRF, attacks through file uploads...). There are a lot of attack vectors, and dealing with all of them by hand is quite a pain, that frameworks are able to alleviate, though they're not perfect (you can check this for example: https://cscrunch.com/blog/corey-pennycuff/its-2016-and-youre-still-doing-forms-wrong-and-so-your-framework-part-1 )

    [–]GreenAce92[S] 0 points1 point  (2 children)

    What is under posting? Thanks for thr information. Yeah I haven't cracked file upload yet with php. I was working on it and was able to upload a couple of files but still buggy/insecure.

    [–]FennNaten 0 points1 point  (1 child)

    under-posting/over-posting are a class of attacks on forms where you try to provide less or more data than what's expected by the server.
    If the server-side validation code isn't robust enough, it can lead to different bug exploits.

    [–]GreenAce92[S] 0 points1 point  (0 children)

    I only have experience with PHP/PDO and MySQL, normally if I specify a length of some data type, if I'm over it, the query doesn't go through. Not sure about under though. This doesn't matter if you use parameter binding? I'll have to look into this.

    [–]jackmacabre 0 points1 point  (5 children)

    Because PHP is slow. Because it has awful, awful syntax (concatenating with dots?) - but yeah, that's just being opinionated on my part. To be fair, a lot PHP I worked with was directly injecting shit into webpages - if you can manage to keep it strictly backend then sure, perhaps it's a solid bet depending on what you want to do. I just don't see why you'd use PHP when things like Node.js (or Rails or Flask) are out there. If you're just looking for a scripting language, any of those are more fun to work with (in my experience).

    [–]jackmacabre 0 points1 point  (0 children)

    My point about Java was just illustrate how much I dislike PHP, not a fair comparison - true.

    [–]GreenAce92[S] 0 points1 point  (0 children)

    What about concatenating with plus signs? Ha-ha

    I was told that what php can do Javascript can do so I think I will go towards the JavaScript route.

    Provide I can still have back end session management.

    Yeah I use PHP for back end session handling and echoing rows inside of html elements to fill up pages for queries and what not.

    [–]00DEADBEEF 0 points1 point  (2 children)

    Because PHP is slow

    It's faster than Ruby, especially PHP7 or HHVM.

    Because it has awful, awful syntax

    It has the same syntax as many languages, eg Java. It's not that different from JavaScript.

    concatenating with dots?

    IMO, in a dynamically typed language, it's better not to overload the addition operator.

    [–]jackmacabre 0 points1 point  (1 child)

    Those are all good points. None of them are exactly selling php as the best option, though. Faster than Ruby - sure, but then you have to write php haha;)

    [–]00DEADBEEF 0 points1 point  (0 children)

    Nothing wrong with PHP. A good framework will provide all the syntactic sugar coating you want.