How to use snippets for web and mobile development

How to use snippets for web and mobile development

If you are mobile or web developer you sometimes get to re-use a lot of code. By repeating some lines of codes you may actually end up learning them, but sometimes in the meantime you have to go back to previous projects, copy and paste; other times you end up googling some specific code. Stop waisting time and use snippets.

[symple_box color=”blue” text_align=”left” width=”100%” float=”none”]

I always thought snippets were a great idea but didn’t quite used them until 3-4 years ago, it has saved me a lot of time.


Yesterday I got an email from MobileTuts (7 tips to speed up your development), here they mention the use of snippets for xCode so this is how I got the idea to write this post.

[symple_divider style=”solid” margin_top=”20px” margin_bottom=”20px”]

What type of snippets do I use or save?

For web development I save basic snippets like:

  • HTML 5 basic structure.
  • jQuery Mobile headers
  • PHP Database connection
  • PHP SMTP code
  • Email Templates


I’ve been working more on mobile projects recently, and had no idea that xcode has a snippet library, well actually I knew it existed but I never quite made the connection in my mind, that I could add my own snippets. So Im planning to save some snippets for:

  • Dismissing a UIView
  • AFNetworking
  • iRate
  • Some other custom UI animations
[symple_divider style=”solid” margin_top=”20px” margin_bottom=”20px”]

Tools that have Snippets. 

I use a Mac for work, and here are some tools that I use a lot that allow you to save and use snippets.

  • Coda 2
  • Espresso
  • xCode

If you are using any other OS, or just don’t find a great way to manage his codes, it would also help to save it on a cloud note app like Evernote.


[symple_divider style=”solid” margin_top=”20px” margin_bottom=”20px”]

Image by Dominik Schmidt from dribbble.

Leave a Reply