A Beginner’s Guide to HTML & CSS

 @shayhowe sum up HTML & CSS for beginners: “A Beginner’s Guide to HTML & CSS” http://learn.shayhowe.com/html-css/

A nice presentation in 10 topics showing techniques that’s not outdated. Most of the resources you search on web about html and css, are from 90s showing very old outdated methods.

Shay Howe also started to work on “Advanced Guide to HTML & CSS”. It’s still in progress but it’s accessible as it’s available http://learn.shayhowe.com/advanced-html-css/

Integration and verification of iOS In-App Purchases

 Economy models in iOS apps use In-App purchases become very popular. Lots of developers pick iOS environment because of the flawless payments through iTunes.

If you’re planning to have a monetization model in your app, it has to go through Apple system and you have to use in-app purchases. There is no other way to accept payments from your iOS apps. There are pros and cons of using Apple in-app purchases. I’ll try to explain some of them.

The biggest con is Apple takes 30% of your sale. And another con is, there are difficulties and grayed areas in the integration of in-app purchases to your app and back-end. But the pros make all even. Because delegating whole payments to Apple is gonna affect your sales because Apple makes it so seamless that it reduces all money related steps to only one confirmation box. So it changes the purchase experience and makes it what it supposed to be. Most of the checkout or payment experiences on web, faces lots of drops because of unnecessary and boring steps like putting your credit card info, trying to give the trust to user that you’re a legitimate company and have legitimate payment system that you will not sell their info out or you won’t let hackers to pick your customer info up. All those buying experience changed in iTunes payments. So this is why you should want to integrate in-app purchases. Continue reading “Integration and verification of iOS In-App Purchases”

Profiling and optimization on Facebook PHP SDK

If you’re developing PHP based Facebook application, you might want to use (or already using) Facebook integration little more than just authentication and identification of your user. Even if you have the simplest Facebook app and using PHP SDK, you probably have regularly done API calls.

You write your app and you start to see performance issues. You start to optimize your database interactions, PHP code optimization, after you done with your application optimization if you still have performance problems it’s possibly from Facebook calls. Since you use SDK, you might not know what’s happening with Facebook communication. So you want to do profiling between your app and Facebook API servers.

You can add a basic timing profiling to your API calls to see how many calls you do, what kind of calls they are and how long they take to run.

Let’s dive in SDK, modify it a bit and start getting profiling information. Here is the actual method you need to modify in base_facebook.php file:

and we’re modifying it like this:

It simply appends a global array named “facebookApiCalls” and adds the API call details as “args” and timing as “duration”. So at the end of your page logic code, you can print this information after sorting it by duration and you can also filter to show only slow ones (for instance, the ones took over 200 milliseconds).

After this profiling you can start to identify the slow calls, also if you do same calls multiple times because of recursing, recalls etc…, you can see and optimize, combine them.

This optimization is not only a performance tweak for the user, also it will decrease the number of calls made between your server and Facebook servers.

iPhone 5 and iPad Mini’s tend to fall easier and more often

I dropped my iPad mini this morning, it somehow flipped in my hands, fell and kissed the floor from the back side. I did similar with my MacBook pro 5-6 years ago, just a week after I bought it. That’s the only device I dropped until now.

I am usually very careful with my mobile devices but except this last incident, I never dropped my stuff. I’ve been using my iPhone 5 and I dropped it 3 times in the first week. I got my iPad mini last month and it also is lighter and thinner than they were.

I commute using the subway on a daily basis and I usually read on my iPad, I wasn’t carrying my regular iPad but I started to have the new one almost every day. I use a crowded subway line in the mornings and this morning, I was hustling with the crowd to get in and after I got in, I was stabilizing my position and somehow iPad flipped in my hands and I dropped it. It was between stress moment and playing cool 🙂 Nothing happened anyway.

We used to have heavy devices usually and after last ones, I still couldn’t get used to hold them. But it’s obvious that these lighter and smaller devices tend to fall more easily and often. I see cracked screens everyday. Probably screen replacement become cheaper and easier and there are more companies providing these services, i’m assuming this is the case, even if it isn’t, it will be soon.

You may wanna check these durability videos: http://youtu.be/pMvE0lkunBg and http://youtu.be/T4kBn-GRw1M

Database Integration in PHPStorm, PyCharm or RubyMine

JetNrains released better database integration to their IDEs which applies to PhpStorm, PyCharm and RubyMine. They had database integration with some level of functionality but recently they released a video with their latest updates which is included in this post. I didn’t use database integration before in PHPStorm but i tried after seeing this video and i found it very productive and helpful.

After installing Java connectors (which you can do it with no extra effort) you’ll be good to go for connecting your database with many different database engines in your project. With database integration, you can review the structure of your database, access and manage your data and develop your SQLs with lots of cool features. These stuff are pretty standard so far, almost like a replacement of PHPMyAdmin. Nothing very new.

I found a particular connection between my code and my database very helpful, and that is, you can develop your SQL while you write your code, or you can test and run your SQL from your code without touching, copy/pasting. Also it does code IntelliSense while you write yourSQL which saves some time from mistypes and makes sql development more fun.

Check this video out for feature tour:

Source: http://blog.jetbrains.com/webide/2012/11/sql-support-and-database-tools/

mfyz.com is responsive!

I’ve put my efforts on making mfyz.com responsive and mobile compatible last week. After 4 days work, now you are able to access mfyz.com from your tablets and phones (small screen devices).

I’ll write about coding responsive layouts following weeks. There are lots of CSS frameworks that allows you to build responsive layouts but I didn’t use any CSS frameworks when I coded current interface. I could transition to twitter bootstrap but I didn’t see any need to do so. Also the current layout is simple enough to not require any complex structure. Anyway, let’s get back to the subject.

Desktop version (as you can see above) is displayed for 800px and wider screen resolutions. For smaller screens than 800px, interface turns to mobile compatible fluid layout. As you know, fluid layouts are resolution independent because they are fitting the screen they’re in. That’s the reason most of the mobile compatible pages built in fluid layouts.

Tablet devices are usually 800px and wider when they are held landscape, so you will see mfyz.com’s desktop version for landscape orientation on most of the tablets.

Also, most of the tablets have below 800px wide screen resolution for portrait orientation, so the site becomes fluid and mobile compatible version. The mobile compatible version is optimized for better readability and optimized navigation.

PHPStorm: Most advanced PHP IDE so far

I’ve been using PHPStorm from day one of their beta release, and very happy with it.
They enhanced Java based NetBeans in the beginning, but it’s completely boosted with a lot of features.

Biggest problem developing web projects using PHP is the lack of tools and big effort requirements for creating a stable integrated development environment. There are very good simple and clean editors but none of them is not farther than a code intellisense enabled editors. What I mean is there are debuggers, advanced editors, database management tools, but all of them has their own ways, not communicating and not integrated. And it varies on different operating systems.

When I first tested phpstorm in the beta times, they had this minimal advanced editor with some half working hard to configure add-ons like svn support, debugger integration etc but wasn’t easy to get it up running. But they improved the initial configuration steps much easier, they touched lots of add-ons to get them more integrated with less configuration and they started to support modern languages for different web technologies (html5, less, sass, haml). Here is a couple of features that I like and probably you’ll find them very usefull as well.

Code Intellisense is not just for PHP, also most of the languages that you use for general PHP based web project (HTML, Javascript, CSS, XML). Also, code intelligence supports most of the PHP, Javascript frameworks and helps you to get faster coding.

Debugging PHP runtime with xdebug, you can catch, stop and debug your PHP app while it’s running. Also, makes the error handling way easier.

Version control system integration allows you to integrate your svn, git projects, access versions and manage working copy.

Database connectors support all SQL engines that Java not just allows to browse, alter your database structure also there is a database console that you can use code IntelliSense when you develop your SQL. This is a common feature for most IDEs so far but PHPStorm also uses database connections for every project when you write/browse or debug your PHP code if it’s running a SQL. You can run or use code IntelliSense when you’re writing your SQL in your code.

Also, PHPStorm has other ton of features like automatic deployment, automatic upload over FTP/SFTP protocols, zen coding, code snippets etc…

They released 6 major versions in 3 years that was basically touched version of NetBeans in the beginning but now it gives totally enhanced and different coding experience. Unfortunately, you need to pay $100, the first time and it gives free updates in minor releases. But if you want to update in major releases you need to upgrade your license in 1 year periods for $50. But it’s nothing compared to what you get.

JetBrains also develops most of the features in PHPStorm for their common product base which you can have similar or same features in their other IDEs for Ruby and Python developers. If you develop Python or Ruby, you should check PyCharm and RubyMine out.

PHPStorm’s homepage: http://www.jetbrains.com/phpstorm/

Little more about me

Hey mfyz.com English readers,

I recently started to write in English on my site which I usually write about web development (usually web projects, PHP MySQL based in the back-end, anything in front-end).

Before I start to translate old articles or write new ones, I would like to talk about myself, about my background. Hey, who doesn’t want to learn about who they read right?

Anyway, I work in a startup called Moonit as a Web Developer and we built Moonit iPhone App around 1,5 years ago. We also have a website basically mirrors the mobile experience. So we are a mobile-first company and app laboratory. We’re proudly in New York City and we have this view from our office:

I’m from Istanbul, Turkey, I worked in couple different digital agencies most with shiny and well-known brands, which was fun and good challenges in a different way beside of working in big teams. I worked a long time as a freelancer on my own or with couple fellows as small teams for the total of over 10 years. I worked as back-end developer, front-end developer and some very light UI designer before. Now, I’m doing mostly product design and mobile UI design. You can check out my portfolio http://mfyz.net for more on what I did before.

Feel free to shoot an email to fatih at this domain to say hi.

IE Sucks (less)

Microsoft doing things less sucks lately. I like their Windows 8 release strategy, even if they still copy Apple products and services (look new Microsoft stores). I shouldn’t criticize without using it but reaction on social media agrees me.

IE is the most hated browser or more generally, most hated software all times. But it looks like Microsoft turned this into a good oppurtunity with creating their new ad campaign based on this. They release this new video.

llowfullscreen”>

Also you can check the website they have http://browseryoulovedtohate.com

How to display AppStore banner in your web page

If you have an app and you might want to show an app banner when you user visit your page from their mobile safari. For iOS devices, displaying appstore banner is as easy as adding a meta tag to your html page.

How To Implement To Your Website

Add this meta tag to your web page:  <meta name="apple-itunes-app" content="app-id=your_app_id" />

You need your app’s id (a numeric identifier) which you can get it from iTunesConnect interface.

When you add this meta tag to you page, safari handles the rest and shows the banner. In iPad, it also shows some of the screenshots of your app.