EasyList – A MochaPHP project

26 Aug Share

Yay! I’ve delivered on my promise. I created an entire app so that others can learn how to properly use Mocha. EasyList is a task manager with a complete user system behind it.

The set of features

  • Sign Up
  • Login
  • Password Recovering
  • Updating Password
  • Updating login email
  • Add Tasks
  • Edit Tasks
  • Mark task completed

What you can expect to learn from this example

Everything but templating. I’m sure I’ll update this project soon, just not now. Remember, this wasn’t meant to be a full blown task manager (we have Things for a reason, you know?), but rather an actual app to learn how to use Mocha to make your apps. I was tired of seeing “how to make blogs” examples.

Download EasyList here. Or just head over to the official MochaPHP repo and download it there.

View Comments

Categories: MochaPHP, Random

MochaPHP: Now smarter about URL handling

19 Aug Share

MochaPHP has now been updated to be a lot smarter about URL handling. Prior to this update, Mocha would be all confused if you uploaded and installed it in a subdirectory. This doesn’t happen anymore as Mocha will automatically find the root directory of installation and handle the appropriate URL routes.

Nothing major has been added though, and I’m still working on the docs. Shouldn’t be much longer, but some Grip’d projects have me distracted for a bit.

Download MochaPHP

View Comments

Categories: MochaPHP

Quick Tips: EGODatabase

18 Aug Share

If you’re not a big fan of CoreData, or just want a simpler way to interact with your sqlite databases, EGODatabase is a simple to use, thread-safe solution for OSX & iOS projects alike. All you have to do is import the EGODatabase files into your XCode project, and include them wherever you want sqlite interaction. There aren’t that many tutorials online on how to start using EGODatabase though, so here are a few tips that should get you going in the right direction.

Initializing an instance of EGODatabase

EGODatabase *database = [EGODatabase databaseWithPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"dbname.db"]];

Executing a query

[database executeQuery:@"SELECT * FROM users;"];

Getting results from a query

EGODatabaseResult *result = [database executeQuery:@"SELECT * FROM users;"];

Finding out how many results you have from a query

EGODatabaseResult *result = [database executeQuery:@"SELECT * FROM users;"];
NSInteger numResults = [result count];

Going through results

EGODatabaseResult *result = [database executeQuery:@"SELECT * FROM users;"];
if([result count] > 0) {

for(EGODatabaseRow *row in result) {

    // To get the value of a column from the current result, you call the stringFromColumn: method for EGODatabaseRow
    NSLog(@"%@", [row stringForColumn:@"username"]);

}

} else {

    NSLog(@"There are no results here…");

}

View Comments

Categories: OSX Development, XCode, iOS

Tags: , , , , , ,

Quick Tip: A UITableView won’t reload itself you know?

15 Aug Share

It might sound obvious, but you’d be surprised at just how many new iPhone developers think that calling [tableView reloadData]; will reload their table’s data alone. If you’ve done this, it’s okay! The best way to handle table reloading is to create a method that handles JUST reloading the table’s data, and at the end of this method, call the [tableView reloadData];
(more…)

View Comments

Categories: iOS

Tags: , ,

META tags to help your iOS web app look like a native app

13 Aug Share

Creating an iOS web app is extremely simple, yet extremely underrated. Advantages to web apps include being able to instantly “push” updates of your app, not having to go through the Apple approval process, and multi device compatibility.

Making your web app feel like a native app is not so hard, and with the following HTML tags, your app should be looking good in no time. Please note that all of the following tags go in between your HTML’s <head></head> tags. (more…)

View Comments

Categories: iOS

Tags: , , ,