Tag Archives: programming

September 29, 2014

Using namespaces with Silverstripe

Author
Jason
Time
9:01 pm
Filed under
Tags
, , ,

I've been trying to use namespaces more in some of my work recently. Not because it was necessarily required, but so I can get into the swing of using namespaces for when it may be required. A few recent projects have involved using Laravel, and that makes use of namespaces, so I went with it. Moving back to SilverStripe. With version 3.0, SilverStripe moved to requiring at least PHP 5.3 - yeah, that was a while ago and at the time of writing, the current stable version is 3.1.6. Anyway, ... read more

September 16, 2014

JSON and Swift

Author
Jason
Time
11:50 am
Filed under
Tags
, ,

At last I have finally gotten around to investigating Swift, the new language from Apple for creating apps for both IOS and OSX. In common with many people, I've decided to dive straight in and access a web based API that expects, and returns, JSON encoded data. So far, so good. As it happens, I have a few projects all set up locally that expose RESTful APIs, so I immediately have something to test against. It's all going great. Plug in some boilerplate code, and hey presto, my API is ... read more

July 31, 2011

Command line debugging

Author
Jason
Time
7:10 pm
Filed under
Tags
, , ,

I've been working for a while on a command line PHP script that doesn't use the webserver. The main problem I experienced was the inability of Eclipse/PDT to successfully launch a command line debugging session. This was because the PHP config that was loaded didn't include most of the modules that I required (the first to error was MySQL). Well, I needed to get work done so I soldiered on with "classic" debugging, adding a debug mode that controlled several aspects of the execution of the ... read more

May 2, 2011

Code styles

Author
Jason
Time
4:23 pm
Filed under
Tags
, ,

It may seem a little dull and mundane, but working with a consistent coding style will always benefit whatever project that you are working on. The style, or convention, that I'll be outlining here is what I have come to use over a long period of time. It has also been honed by working with other developers, taking on new ideas and methods. It is when you are working in a team that using a consistent coding style really pays off. It helps keep all the code clean and readable, therefore more ... read more

June 19, 2010

MVC – Should you use it?

Author
Jason
Time
5:46 pm
Filed under
Tags
,

MVC - Model View Controller, is a sofware design pattern. The aim of MVC is to provide clean separation between data (the model) and what visitors/users see (the view). The controller sits between the model and the view marshalling data between them. MVC is a pattern that can be applied to numerous software development situations, from developing desktop/mobile applications through to websites. Here, I'll be discussing MVC in relation to website development. User <--> View ... read more

March 26, 2010

Netbeans – The conclusion

Author
Jason
Time
8:52 am
Filed under
Tags
, ,

Well, I've given it a good go, but for me this is the end of the road for Netbeans (for the time being).  There wasn't a lot in it to be honest and Eclipse does have its drawbacks too, but in the end there were just some features that I decided I missed too much. There is a handy function search in Eclipse that can be invoked by ctrl+o(on a PC anyway, the Mac key bindings probably include the apple key).  A dialog pops up listing all the functions/methods in the current file, nicely ... read more

March 15, 2010

Netbeans & remote files

Author
Jason
Time
9:19 pm
Filed under
Tags
, , , ,

Just come across a scenario in Netbeans that can be a bit annoying.  Editing remote files.  In short, it isn't possible without downloading the whole site. 99% of the time I work on a local copy of a site. When I get to a certain point I'll commit the changes to the associated SVN repository. When the changes are ready, I will create a tag from trunk or whatever branch I'm working on and then deploy that tag to the live site or preview site. I hasten to add I never work directly on a live ... read more

March 14, 2010

Netbeans & SVN

Author
Jason
Time
10:15 am
Filed under
Tags
, , ,

I've been using Netbeans for a few days now and I have to admit, my initial worries about changing IDE are slowly being addressed. The main area where I have been experiencing some issues is the SVN support.  It doesn't seem quite as intuative as some other tools (mainly Subclipse and Tortoise).  For example, to access a repository browser, you need to start some sort of action like a commit or copy. Being able to go straight into a browser would be handy.  This is achieved in Eclipse via ... read more

March 11, 2010

Trying Netbeans

Author
Jason
Time
12:15 pm
Filed under
Tags
, , ,

First off, my IDE of choice for the last few years has been Eclipse with the PDT (PHP Development Tools) plugin. It has served me well and on several platforms too - currently on Windows 7 but for about a year my work box was running Ubuntu - ahh the good times.  Anyway, back to the point. After trying lots of PHP dev tools, I stumbled across the PDT project and decided to try it out.  Never really looked back. The other day, after a bit of a conversation on Twitter, I was prompted to ... read more