Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Archive for August, 2012

Using PHP magic methods

Thursday, August 30th, 2012 by Servage
PHP includes a brilliant concepts called overloading which means you can try to get and set undefined properties as well as run undefined methods. In this little tutorial I will show you how to handle overloadable properties. Every time an undefined property is accessed, the object will try the magic methods __set() and __get() instead of just returning an error right away. If they are defined, it works. Consider the following example class: class Magic { var $data = array(); function __construct($data) { foreach ($data as $key => $value) $this->$key = $value; } function __set($key, $value) { $this->data[$key] = $value; } function __get($key) { if (isset($this->$key)) return $this->data[$key]; } function __isset($key) { if (isset($this->data[$key])) return true; else return false; } function __unset($key) { if (isset($this->$key)) unset($this->data[$key]); } } You can use this class to extend ...

Move your website into the spatial web

Monday, August 27th, 2012 by Servage
Spatial data is becoming increasingly popular to use for websites and apps. Services like Foursquare, Facebook and Google Maps are relying very much on places and other geo-referenced content, which the users wish to consume based on geographic search or location. Therefore handling geographic - or spatial - data is important to understand for web developers. Database software MySQL and PostgreSQL are some of the most popular database software, which is used by millions of websites around the world. PostgreSQL has spatial functionality though an extension called PostGIS, which has been widely acknowledged as one of the leading solutions for spatial databases for a long time. However, MySQL has improved and is ...

Is Beanstalk an alternative to GitHub?

Friday, August 24th, 2012 by Servage
Previously we have put more emphasis of presenting source code version control and tools you can use to do that. One the most popular choices today is Git, used for example with the increasingly popular code portal GitHub. However, this is not the only place you can do so, and for example Beanstalk is a real player in the market, which may prove a worthy alternative. They have a somewhat different approach, but the essentials are the same: Version control. The biggest advantages for Beanstalk over GitHub are support for Subversion and Mercurial and a pretty good deployment tool. So, check it out. Setup and manage repositories No server administration necessary. Import or ...

Sign your documents online with Hello Sign

Tuesday, August 21st, 2012 by Servage
In a world with an increasing amount of app's coming out, we still find ourselves exploring new possibilities every day. I just recently found Hello Sign, which does a simple, yet brilliant thing. You can use it to sign documents online and thereby get rid of the whole paper mess and snail mail delays. Scan documents with your camera Need to digitally sign a paper document? No problem. The HelloSign App doubles as a mobile scanner. Take a picture of your document and import it to be signed. Sign documents from anywhere The HelloSign mobile app means that you no longer have to sit around the office or seek out a copy store to ...

Using GitTower to work with your code

Friday, August 17th, 2012 by Servage
GitTower is an alternative to the SourceTree app we presented recently. It comes with similar features, but may be a better choice for some. It is: Easy. Efficient. Powerful. Git is the future of version control. But using it on the command line can be difficult. Make your life easier with Tower - the most powerful Git client for your Mac. From Beginner to Master Learn Git with Tower. With its easy-to-use interface you'll be up to speed in no time. Tower takes the pain out of Git and makes complex tasks simple. Tower has all of Git's advanced features waiting for you: single line staging, submodule support, file history... Increase your productivity - without ...

Simplify pricing updates for your webshop

Wednesday, August 15th, 2012 by Servage
Managing products, descriptions and prices for the items you sell on your website or in your web shop can be a tedious process. Especially more professional and larger shop owners may struggle with interfacing between shop software and other logistics software, for example supplier and delivery management and accounting. File2Cart is a tool that tries to close one of the potential gaps, reducing the amount of manual work required to stay up to date. Basically it offers a way to automatically submit pricing updates to your web shop. They describe: Generally, each store owner comes to the point when they seek for easier ways to update their database in the fastest ...

Source Tree provides a GUI for version control

Sunday, August 12th, 2012 by Servage
Are you a web developer who doesn't like to play system administrator when working on your website? I personally don't like command line stuff, and prefer the look and feel of user interfaces with buttons, menus and things to see and understand, whilst not just executing boring and complex commands. The same goes for using version control. Obviously you can run your checkouts, commits, branches, merges or whatever i a command line, but there are beautiful tools out there which visualize the often complex structure of your versioned source code. Source Tree is a beautiful desktop app for Mac, which allows you to handle your version control with a great ...

Manage your code with GitHub

Saturday, August 11th, 2012 by Servage
If you're a busy web developer, the last thing you want is to struggle with code and project management. Previously we described how version control systems, one them called Git, could help you with that. Today we present GitHub, a place where you can manage your code, using the Git engine, but at the same time getting a whole lot of great tools to help you even more. Manage Teams with Organizations Whether you're running an open source project or a Fortune 500 company, Organizations simplify team management. With teams you can give your developers as much or as little power as they need, from the ability to create projects on ...

Use version control to improve development workflows

Thursday, August 9th, 2012 by Servage
Version control aka revision control is a way to make sure you follow the development and changes within your project and files. It is designed to help you understand changes, work on separate features, combine different versions of the same code, or go back and revert to older code if problems occur. All in all, version control is really something you should use to improve your development workflows. Dropbox - the simple choice Dropbox is a file syncing service which automatically syncs all changes you make in files to a central server, and keeps copies of them including change history. Dropbox is not a real version control system like the more professional ...

Working with Widgets in Yii Framework

Wednesday, August 8th, 2012 by Servage
Widgets are a great tool in Yii to encapsulate recurring view logic and design into reusable elements, called Widgets. These widgets can be anything, like a sidebar-box, a menu, or whatever your application needs. The main concept and advantage of widgets is that you can build your code once, and reuse it wherever you need it in your view. Check out the below from The Ultimate Guide to Yii here: A widget is an instance of CWidget or a child class of CWidget. It is a component that is mainly for presentational purposes. A widget is usually embedded in a view script to generate a complex, yet self-contained ...