Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    Join Date
    May 2005
    Location
    Chicago, IL USA
    Posts
    1,430

    Lightbulb PHP is Awesome, and Smart

    PHP is awesome. It’s widely used, has its roots in true system programming languages like C and has perhaps the best and biggest development community. While I don’t claim to be a PHP expert, I did spend 4 years making my living as a LAMP ( Linux, Apache, MySQL, PHP ) developer.

    When I first began coding, it was a horrible mess and yes, the first thing I ever coded was “Hello World!” I didn’t declare variables, didn’t comment code and certainly didn’t bother writing functions or classes to make my job easier. I remember the first time I found a function to write the date on the bottom of my web site and I thought it was the coolest thing since sliced bread! Naturally, as time went on I learned to utilized functions to make my job easier, made beautiful descriptive comments and even declared my variables. As I took on bigger and bigger projects, my code had to improve as it became too time consuming to do things the way I had been doing them.

    Once I had mastered functions, I moved onto Object Oriented Programming, in other words, PHP Classes. When I first started utilizing classes in my work, I was like Columbus discovering the New World. My coding life became a breeze and I was completing projects in record time with beautifully formatted code that was fast! I utilized classes for database interaction, time formatting, file and image based functions, networking functions and more. I worked with so many amazing PHP classes during my time as a freelance developer, however, I think the best class I ever came across was the Smarty Template Engine. So, now that I’ve exhaustively gone on about myself for what seems like ages, I will get to the meat and potatoes, Smarty.

    If you are not familiar with template engines, there purpose is to allow developers to separate front-end code with back-end code. This allows a designer or design team to create and modify the graphical front-end of a web application without affecting the back-end PHP code. There are a lot of different template engines out there such as patTemplate, PHPTAL, FastTemplate, SimpleTemplate, Savant and more. I personally used both patTemplate and FastTemplate, however, none of them seemed to have the flexibility and extensibility of Smarty. Interestingly enough, the developer of FastTemplate also loves Smarty, which you can see from this post. Smarty is really much more than a simple tag replacement class, in fact, it’s more of a template framework.

    If you are new to PHP templates, you might feel like learning Smarty is like learning an entirely new programming language. If you’ve ever worked with Cold Fusion, it will make a lot of sense to you as it’s a tag based syntax. Smarty is also very familiar to PHP developers as its variable prefix uses the familiar dollar sign ($) and its if, then, else statements also work similarly to PHP. Smarty has an enormous catalog of functions that allow developers and designers to get very creative with their presentation layouts in addition to providing developers with enormous flexibility. I would argue that the best, albeit most dangerous capabilities of Smarty is that it allows execution of PHP code directly within the template. If you are a developer and possess full control over your codebase, I would never recommend this. If, however, you are working on an encrypted third party application that uses Smarty, you will be limited to editing only the templates and then having PHP coding capabilities can be absolutely wonderful.

    Smarty is a very easy system to deploy, does not require additional system resources and integrates with any PHP deployment. Smarty is a system that many of us SolarVPSers know well and its easy to deploy on any VPS or Dedicated Server running cPanel or Plesk. Smarty can even be installed on Windows!

    You can obtain more information about Smarty here: http://www.smarty.net

    For more information regarding PHP, go here: http://www.php.net

    Author: Ross Brouse
    COO FortressITX
    ||| Mike Bowers - Marketing Director
    ||| atOmicVPS LTD
    ||| OnApp Powered Linux & Windows Cloud Hosting ► [Shared] ► [Reseller] ► [VPS]
    ||| Follow the atOmicVPS Blog
      0 Not allowed!

  2. #2
    Two of my favorites software packages use Smarty. Pinnacle cart and the one, the only, the venerable... WHMCS!
    CapeWP.com
    CapeWP.com - WordPress for all of us
      0 Not allowed!

  3. #3
    right, Php is Awesome and Smarty's cool
      0 Not allowed!

  4. #4
    Join Date
    Sep 2011
    Posts
    43
    I don't have much idea about Php but as in these day's i am learning Php and have attended introduction classes about PHP and very excited about it.
      0 Not allowed!

  5. #5
    Join Date
    Oct 2009
    Location
    Canada
    Posts
    485
    Object Oriented Code (AKA PHP Classes) add simplicity to medium to large complex sites.

    But, it also adds unnecessary complexity to simple sites.

    Sometimes you don't always need to use them ;-)
    █ Pentester & IT Security Consultant
      0 Not allowed!

  6. #6
    Join Date
    Jul 2009
    Location
    UK
    Posts
    1,312
    Agreed, PHP pwns!
    Live Chat Support Software for your Business website - IMsupporting.com
      0 Not allowed!

  7. #7
    Join Date
    Jul 2009
    Location
    Dallas, Texas
    Posts
    259
    PHP is wonderful. I grew up on plain HTML but PHP is amazing. Only way to code now!
    Justin
      0 Not allowed!

  8. #8
    This was a good read thanks very much. I have been learning PHP for some time now. I really like smarty.
      0 Not allowed!

  9. #9
    Join Date
    Mar 2010
    Location
    England
    Posts
    374
    Why would you suggest using something like Smarty over PHP itself, seeing as PHP is essentially a template language already?

    (Not having a go, I've just always wondered why people who are fans of separate template languages bother.)
    Script Shepherd - Pain-Free Vulnerability Management for Web Hosts
    No more messy cleanup tickets! Launching soon - sign up for the beta today to try us out.
      0 Not allowed!

  10. #10
    Join Date
    Nov 2011
    Location
    Bangalore, India
    Posts
    37
    Yes, that's right.
    http://www.infihosting.com: Perfect Hosting Solution
      0 Not allowed!

  11. #11
    Join Date
    Jan 2011
    Location
    London
    Posts
    609
    I am using php for more than 2 years and i am very glad working with it. But now when HTML5 will come up i am thinking to work on it.
      0 Not allowed!

  12. #12
    Join Date
    Jun 2009
    Location
    UK: Oxford
    Posts
    1,259
    When I started my new job in London, just knew a little info about functions and how to use them properly.

    7 months later and I'm now writing self-correcting OO that requires very little maintenance. This smarty system looks interesting, could come in handy when I'm asked to work on a small website project again.
    Garbott Ltd - Exceptional web development, hosting & consultancy services
      0 Not allowed!

  13. #13
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    14,135
    Who DIDN'T get their start by using 'hello world' examples? I still use that to test cgi-bin directories which have nasty permissions and problems.

    I have to agree that php is pretty awesome and smart. Couple it with MySQL and you can do pretty much anything. At one point (12 years ago or so), I started working on a MUD (look it up ), trying to get the backend to tie into MySQL so staff could edit things through a CMS , and just haven't stopped playing with php/MySQL ever since. If you know what you're doing, it can do everything from monitor your server to chat (AIM, etc) to tweet to text message.. There are a number of things that make it just great at what it is.
    Tom Whiting, WHMCS Guru extraordinaire
    Linux problems? WHMCS Problems? Give me a shout
    Check out my WHMCS Addons
      0 Not allowed!

  14. #14
    Join Date
    May 2009
    Location
    Kiev
    Posts
    11
    i use only PhP =) !
      0 Not allowed!

  15. #15
    Join Date
    Sep 2011
    Posts
    57
    Php is really awesome.and I like to use it.
      0 Not allowed!

  16. #16
    PHP is great! Also I recommend Ruby on Rails.
      0 Not allowed!

  17. #17
    In fact PHP's development is focused on server-side scripting, you can play with it a lot.
      0 Not allowed!

  18. #18
    Join Date
    Jan 2012
    Location
    Miami, Florida
    Posts
    14
    PHP change the world as it is open source and available with free of cost. PHP is easy to learn fast and flexibile in use.
      0 Not allowed!

  19. #19
    Join Date
    Sep 2003
    Posts
    531
    It's one of the more common languages because of it's power -- that is not to be argued. Though I do believe that developers interested in the long haul of the industry must familiarize themselves with other languages and frameworks as well (such as .NET).

    At some point in your career as a web developer, you will be asked to program in something other than PHP. Being an asset includes the ability to adapt to different situations well. As a result, it is strongly recommended that web developers not limit themselves to a single language but rather open themselves to constantly learning new things and discovering the power in knowing all of the options. :-)
      0 Not allowed!

  20. #20
    Join Date
    Jun 2007
    Location
    London, United Kingdom
    Posts
    857
    We moved away from PHP some time ago and only use a couple things in PHP. These days it is all about ColdFusion (CFML) - If you like PHP and want to learn a second language would highly recommend ColdFusion!
      0 Not allowed!

  21. #21
    PHP is a great place to start programming. Yes, it's awesome.
      0 Not allowed!

  22. #22
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    14,135
    Quote Originally Posted by Bapinder View Post
    PHP is a great place to start programming.
    Actually, if you want a really great place to start programming, look at C. It's pretty much adaptable, and once you get a grasp of C, you should be able to easily understand php, etc.
    Tom Whiting, WHMCS Guru extraordinaire
    Linux problems? WHMCS Problems? Give me a shout
    Check out my WHMCS Addons
      0 Not allowed!

  23. #23
    Quote Originally Posted by linux-tech View Post
    Actually, if you want a really great place to start programming, look at C. It's pretty much adaptable, and once you get a grasp of C, you should be able to easily understand php, etc.
    C is much harder to learn in my opinion.
      0 Not allowed!

  24. #24
    Join Date
    Dec 2001
    Location
    Arizona
    Posts
    551
    I love PHP, though I find most jobs I get are done in ASP.
      0 Not allowed!

  25. #25
    Join Date
    Mar 2012
    Posts
    44
    yes it is true. php is nice to work with it as it is open source so there is no need of license too.
      0 Not allowed!

Page 1 of 2 12 LastLast

Similar Threads

  1. iWeb's Smart Layer Vs. Liquidweb's Smart Servers
    By Chaw in forum Dedicated Server
    Replies: 2
    Last Post: 06-05-2011, 04:45 PM
  2. how smart is it to store sessions in APC [php]?
    By grabmail in forum Programming Discussion
    Replies: 7
    Last Post: 08-07-2006, 03:56 PM
  3. Some MAJOR PHP Problems, anyone smart in PHP Please LOOK!
    By Mambug in forum Programming Discussion
    Replies: 9
    Last Post: 06-26-2005, 06:33 PM
  4. PHP Smart Quotes
    By SynHost in forum Programming Discussion
    Replies: 4
    Last Post: 03-23-2005, 04:20 PM
  5. need savvy and smart php/perl coder!
    By roygbiv in forum Employment / Job Offers
    Replies: 0
    Last Post: 12-27-2003, 05:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •