Innlegg

Viser innlegg med etiketten programming

6 posts on #iPhone & #iPad Enterprise Resource Programming: Database and PDF-reporting are covered

Bilde
Creating enterprise apps for iPhone and iPad isn't trivial. In @iFacturas we used 21 months to get out the current version. Now I'm diving into enterprise programming myself, in order to find a better way to do it.  If you know me, you also know I'm loving accounting, specially accounting program design. In many years, there has been two important parts of accounting programs, entering data and reports. Entering data has to do with database and database view programming. Reports with the same database and presenting reports, normally on PDF. I've just finished a roundtrip on database and PDF programming, and have documented the process and the source here in 6 blogposts: I may have found the golden egg in #iOS database programming! It's @sensiblecocoa I've earlier told you about that programming iPhone isn't that hard. That was only partly true however. For database programming in iPhon... Update: Hands-on with @sensibleCocoa #...

My #iOS PDF programming posts are coming to and end. This last tells you how to to finish it.

Bilde
I've combined the  iPhone 4 Development Essesials for XCode  Chapters 32 and 33, with    Apple's print tutorial for iOS .   Most of it is wrapped into the following savePdfFile method: - ( IBAction )savePDFFile:( id )sender {     NSString * path = [[ NSBundle mainBundle ] pathForResource : @"sampleData" ofType : @"plist" ];          // get a temprorary filename for this PDF     path = NSTemporaryDirectory ();     self . pdfFilePath = [path stringByAppendingPathComponent :                         [ NSString stringWithFormat : @"%d.pdf" ,                           [[ NSDate date ]                            timeIntervalSince1970 ] ]];          // Prepare the text using a Core Text Framesetter     CFAttributedStringRef currentText = CFAttributedStringCreate ( NULL ,                                                                   ( CFStringRef ) textView . text , NULL );     if (currentText) {         CTFramesetterRef fram...

#iOS programming is too hard to risk the code. A sidestep on using #git and @github to control it.

Bilde
When preparing for the following, and hopefully last, post, I decided to try to store the project in github.com to let you easily share it. That drove my tutorial to an halt. Without really knowing anything, I did a git init and git commit command, and suddenly all my source-files disappeared! I ceratinly had done something wrong, and had to try to learn Git in order to finish my small tutorial. At least I had to use Time Machine to restore the files, and recreate the project using Apple's built-in Git support. During the work I had a lot of help from the website to the book " Pro Git " by Scott Chaconn. He almost succeded in make me understand it. Way better than the "Git for dummies" wikis, which are made for much more advanced pupils than myself. I had to redo my project, marking it for the use of Git. Then I followed the steps in on github help . So now you can get the the PDF-tutorial files at https://github.com/mortjac/PDF-tutorial . In order to get...

#iOS PDF programming is still not that difficult. Now we dive into #PDF itself ;)

In the last post I described how to "draw" on iOS, which served me well in getting me started on iOS PDF programming. Now I will combine  Apple's print tutorial for iOS  and what I've learned about drawing: As with "drawing", writing PDF isn't that complicated if you sit down and decipher it. And    Apple's print tutorial for iOS  does a good job explaining it. But sadly, the tutorial has a bug in this call. The tutorial wrongly writes: currentRange = [self renderPageWithTextRange:currentRange andFramesetter:framesetter]; instead of the correct: currentRange = [self renderPage:currentPage withTextRange:currentRange andFramesetter:framesetter]; So I got this part running pretty well with the following code: - ( IBAction )savePDFFile:( id )sender

#iOS PDF programming isn't that difficult either. The hard part is to know where to start ;)

Bilde
I like to create a PDF file in my iPhone app. I then did spent to much time looking at various PDF framework. I didn't want to reinvent anything, but the frameworks I looked at just made things more complicated. So today I started to do it the Apple way, that's using Quartz 2D framework in iOS SDK. Happily I already have  iPhone 4 Development Essesials for XCode 4  in my Kindle, so I started on Chapters 32 and 33, which gives an introduction and lesson in Quarts 2D programming. I started with drawing lines, rectangles and ended up with ellipses. And the code drawing the image wasn't difficult at all: - ( void )drawRect:( CGRect )rect {     // Setting context     CGContextRef context = UIGraphicsGetCurrentContext ();      // Setting line width      CGContextSetLineWidth (context, 2.0 );      // Setting color      CGContextSetStrokeColorWithColor (context, [ UIColor blueColor ]. CGColor );      // Create a rectangle      CGRect rectangle = CGRectMake ( 60 , 170 , ...

Update: Hands-on with @sensibleCocoa #iOS tableView framework - I see light in the tunnel!

I've got the "Sensible Tableview" installed. I've passed the videos one more time, and now I'm hands-on. Yesterday I tried a small project with some accounting database stuff. But ran into endless problems. So I decided to follow the Core Data video instead, trying to undersand the sensible way . The video however is showing a XCode 3 project, so there are some small differences. And as "the devil is in the details" it is also present here, and I tumbled. But finally I got it right.  XCode4 has a navigation project template with an example database application that runs out of the box. There isn't any editing posibility however. But by adding a bit of @sensibleCocoa magic, you suddenly get it! Update: Somehow I discovered that the project didn't save. From the @sensibleCocoa forum I got immediately an answer that solved the problem. I just had to add the following line to the  applicationDidEnterBackground method in the navTestAppDelegate...

I may have found the golden egg in #iOS database programming! It's @sensiblecocoa

Bilde
I've earlier told you about that programming iPhone isn't that hard. That was only partly true however. For database programming in iPhone is extremly complex. I've spent weeks trying to build a xcode template letting me have it my way, just to stumble, fall, hurt me, sweat and cry. Instead I got a flu, and had to remember my main objective, which was to make accounting programming in iOS, and to see if a template or framework was the right solution. So curing my flu, I starte feverishly (no pun intenteded;) to look for templates and frameworks or people doing these things that could help me.  I added new tabs for ORM, Objective-C, SQLite on Flipboard and Zite, and after endless flips I finally found something: @giminete in Zaragoza seemed the most interesting. But then on Thursday I discovered the " Sensible Cocoa " tableview framework. They promise to build a database app on 5 minutes!  Oh what a joy. I've been through the videos, a bit into the forums...

Design is Epic

A really good motivation speech of one of the founders of Twitter. A post from techcrunch.com by Erick Schonfeld has the whole story . Here is a part: ...  Engineering is design. Every engineer in this room, every operator in this room, every customer service agent in this room, is a designer. Because you’re designing constantly the interaction that you have with your tools or with your users or with your customers, and you’re trying to bring efficiency and take all the thinking out of that process. So, everything we do here is design. We always want to make the beautiful — to this point — Keith, two minutes before I was supposed to start this Town Square, told me, stop. I’ve got a mistake in my slides, I forgot to capitalize an “S”. I swear. That level of perfection is what we wanna achieve, because if we achieve that level of perfection — it’s gonna take a long time to do that, a lot of hours — but then our users see it immediately, without thinking. And that’s the importa...

Use ScraperWiki to Help Turn Web Pages Into Usable Data

Bilde
With scraping you create programs that reads and organize web pages. For example to get your bank account data into a spreadsheet. (There are still banks that doesn't help you to do that!) A post from Lifehacker by Dave Drager has the whole story . Here is a part:     Dave Drager  —  A scraper is a program written to take content off of a webpage or other data source and turn it into some kind of usable format, usually an RSS feed or by entering it directly into a database. Designing a scraper can be tricky as each site is different, ScraperWiki  aims to fix this by creating a repository of these scripts with a goal to ease the pain of designing them. An example use of a scraper: let's say a government entity releases daily information regarding finances, and you want to graph or otherwise track this data for personal or business use. Going to the website each day and entering the data manually is certainly one labor-intensive way to do it, but as with an...

iPhone Application Development For Dummies

I love these dummies books. They give me enough to have a grip of a theme. Take a look at their Cheatsheets about iPhone programming. They are nice! A post from dummies.com by has the whole story . Here is a part: iPhone Application Development For Dummies From  iPhone Application Development For Dummies, 3rd Edition   by Neal Goldstein The  UIKit  framework provides a great deal of your iPhone application's basic functionality. As you develop your iPhone app, you customize the behavior of the UIKit  framework by using subclassing, target-action, delegation, and block objects. But one challenge facing new developers is determining which of these mechanisms to use when. These tips can help you decide: When to Use Subclassing in iPhone App Development Subclassing is one of the mechanisms you use to customize behaviors while you're developing your iPhone application. Subclassing involves two stages: (1) creating a new class, called a  subclass,  tha...

Ruby for Kids Teaches Your Kid (And Yourself) the Ruby Programming Language

Bilde
How should I teach my grandchildren programming. Well, according to this article, it should be Ruby. A post from Lifehacker by Dave Drager has the whole story . Here is a part: If you have always wanted to teach your child a programming language, there is no better time than the present.  Ruby for kids  is a site that includes directions and screencasts for a new programmer, young or old, to get started in the  Ruby  programming language. More »  
Look at this nice codelines! Nice stuff Microsoft. A post from .from OData Blog has the whole story . Here is a part: Microsoft just announced a new project called 'datajs'. datajs is a cross-browser JavaScript library that among other things brings comprehensive OData support to JavaScript. 'datajs' is an open source project, released under MIT.   For example if allows you to query an OData service like this: OData.read("http://odata.netflix.com/v1/Catalog/Genres", function (data, response) { //success handler });   And do inserts like this: OData.request({ method: "POST", requestUri: "http://ODataServer/FavoriteMovies.svc/BestMovies" data: {ID: 0, MovieTitle: 'Up'} }, function (data, response) { //success handler }); For more information  check out the announcement

Scraping for Journalism: A Guide for Collecting Data

Bilde
Here is the guide in Engligh. An Norwegian version was provided here . A post from The ProPublica Nerd Blog has the whole story . Here is a part: Our  Dollars for Docs news application  lets readers search pharmaceutical company payments to doctors. We’ve written a series of how-to guides explaining how we collected the data. Most of the techniques are within the ability of the moderately experienced programmer. The most  difficult-to-scrape site  was actually a previous  Adobe Flash incarnation of Eli Lilly’s disclosure site. Lilly has since released  their data in PDF format . These recipes may be most helpful to journalists who are trying to learn programming and already know the basics. If you’re already an experienced programmer, you might learn about a new library or tool you haven’t tried yet. If you are a complete novice and have no short-term plan to learn how to code, it may still be worth your time to find out about what it takes to gather d...

Hadoop: What it is, how it works, and what it can do

Bilde
A post from O'Reilly Radar - Insight, analysis, and research about emerging by James Turner has the whole story . Here is a part: Hadoop  gets a lot of buzz these days in database and content management circles, but many people in the industry still don't really know what it is and or how it can be best applied. Cloudera  CEO and  Strata  speaker  Mike Olson , whose company offers an enterprise distribution of Hadoop and contributes to the project, discusses Hadoop's background and its applications in the following interview. Where did Hadoop come from? Mike Olson:  The  underlying   technology  was invented by Google back in their earlier days so they could usefully index all the rich textural and structural information they were collecting, and then present meaningful and actionable results to users. There was nothing on the market that would let them do that, so they built their own platform. Google's innovations were incorporated i...