Posts filed under ‘Smarty’

Hosting..

Part of a recent project for a client involved selecting and deploying a PHP/MySQL application to a hosting provider. 

Each time this requirement comes up – I spend a few hours looking around to get a feel for what’s on offer, the current prices, etc.  This time I stumbled across HostMonster.Com and they have quite an impressive package for PHP based applications. 

Not to mention:

  • Decent Bandwidth allocations
  • PHP 5/Python/Ruby/Rails
  • Custom php.ini
  • SSH access

Setting up the account for the client was quick and easy – and so far I’ve not encountered any problems with them.  Before signing up I dropped an email to their support team asking a couple of questions – to see if/how they responded.  20 mins later a reply turned up.   

If you’re looking for a decent hosting provider that’s not gonna cost you an arm and a leg – I’d suggest looking them up.

Host Unlimited Domains on 1 Account 

Advertisements

Tuesday 8th January, 2008 at 11:50 am 1 comment

VS.PHP 2.3RC1 is out

For those Visual Studio and PHP developers out there – 2.3RC1 for VS.PHP is out from JCXSoftware. 

Initial testing has gone well and it’s looking like a good release so far.  Found a few problems with formatting when editing Smarty templates – but it’s just an annoyance than a problem.

Thursday 24th May, 2007 at 2:59 pm Leave a comment

Develop both with PHP and .NET?

If you’re a seasoned developer and work in both  .NET and also PHP – then you’ll be interested in VS.PHP from JCX Software.  They have 2 main products:

  • A Visual Studio Add-in for developing PHP
  • A stand-alone VS 2005 PHP Editor (using the VS 2005 redistributable wrapping their Add-in

If you’re used to the VS 2005 interface – you’ll find it a real boon with a familiar environment to work in.  It even understands and supports the development of Smarty templates. 

I’ve found it to be very performant and much less of a resource-hog than the Zend IDE – which, after running for long periods of time, tends to lock up and become unstable.

 It’s well priced (at 99 USD) – they’re not trying to gouge you like some development tools that charge high annual tie-in ‘subscription’ fees for development tools.

The current version of VS.PHP is 2.1 with a beta for 2.3 openly available.

Sunday 20th May, 2007 at 2:31 pm Leave a comment

NextGen Smarty… (Smarty V 3.0)

The next generation of Smarty is being planned and they are looking for ideas and thoughts, ideas and contributions on what people want to see in it.

The V3.0 wiki for Smarty ideas can be found here and the page to post your ideas is here.

If you’re interested in the background of the development of Smarty – the Smarty forums are a good place to hang out.  The general forums can be found here

Sunday 20th May, 2007 at 2:16 pm Leave a comment

Smarty & Nested IF’s

Smarty is a great templating system for PHP – however if you’ve ever tried to do complex or reusable templates you can quickly find yourself with lots of nested IF’s.

They can be a pain to debug and trace through – especially with an abstracted template environment (such as Smarty) – as it’s impossible to step through the template generation line by line.

 A solution to writing cleaner code is to use something like:

switch ($var) {
  case "fred":
  break;
  case "wilma":
  break;
  default:
  break;
}

Unfortunately Smarty doesn’t have such syntax – but Smarty has a superb plugin environment that allows customisation of every aspect of templates.  The main maintainers of Smarty pointed me to an example, that with a little adjusting, allowed the switch/case statement to be implement.

The details of the plugin can be found on the Smarty Forums here.

Happy templating….

Sunday 20th May, 2007 at 2:04 pm 1 comment

PHP_Debug & Smarty

The new release of the PEAR::PHP_Debug library provides a great way to debug and monitor the state of your PHP application.  The floating DIV tag provides a quick and easy way to view the PHP variables and to examine your own vars and log messages.  In addition it provides access to the PHP Error messages that often get missed unless you examine the PHP error log frequently.

 Loïc Vernet  (the project lead) has done a great job with 1.0.0RC1 and I’m sure it’s gonna go from strength to strength.  I’d love to see the addition of creating your own top level groups to the toolbar (in addition to those existing already) and to be able to expand and add to the items in Vars & Config.

 If you’re a Smarty user then you’re used to using the Smarty debug console to examine the state of the template engine but the extra popup window can sometimes get annoying – so with the release of PHP_Debug I took the time to combine the output from the PHP_Debug window with the friendly in-browser display of PHP_Debug.

 The result can be found here on the Smarty Forums – version 0.1 isn’t exactly elegant – currently I’m struggling to find a better approach to integrate the 2 without making some core changes to Smarty. 

Stay tuned – I have a couple of ideas in the pipe to solve the problem…

Sunday 20th May, 2007 at 9:49 am 1 comment


Recent Posts