Sencha touch app building - sencha-touch

I was put in charge of learning this and well I have read and tried to understand it all. I am lost in how to get it started and optimized. I need to achieve a window at startup that is menu based and takes you to different components. I think I have the photo galleries sorted out just now sure how to link to the startup window.
examples

I used this tutorial when I was trying to learn - http://miamicoder.com/2011/writing-a-sencha-touch-mvc-application/
The learning curve is quite steep but once you understand it it's a really good bit of kit to know your way around.
If you don't already understand the MVC (Model View Controller) architecture then it's going to be a bit tricky but the tutorial explains it all pretty well.
My advice would be start following the tutorial. Stick to it, get it working and THEN adapt it.
Good luck.

With Sencha Touch 2, the team have created a bunch of guides which hopefully help ease the pain when trying to learn the framework.
I suggest you first take a look at the Getting Started Guide, and then move onto the Building your first App Guide. These both should give you a kick start on where to start.
After that, I would definitely recommend you take a look at the code of their various examples, and then try modifying it. When I was first learning the framework (and JavaScript in general) I found that taking existing code and modifying it was definitely the easiest way of learning. Obviously this varies from person-to-person, but it is always a good step.
Much of their documentation have previews and examples which you can actually edit the code inline, which I have found very useful in the past. You can view an example of this here.
The Touch Forums are very active. Almost all topics get responded to within hours, and I have never seen a post which was never responded to.

Related

Thinking in Semantic UI if I have a Bootstrap background?

I'm familiar with developing webapps and website with Bootstrap (v3 and v4), but now I'd like to start using Semantic UI.
After experimenting a bit I feel like Semantic UI offer less composabilities than Bootstrap, but I'm probably missing some things.
For instance, I'm still unclear on how to I mute a text? Bootstrap has a text-muted class, but I can't find equivalent in Semantic UI
Question
Can you describe the paradigm shift that is necessary? Here are a few questions that might help you frame an answer:
What should I stop doing/using;
What should I start doing/using instead?
Are there any server-side considerations/restrictions?
N.B.: I'm not looking for a detailed comparison between Semantic UI and Bootstrap.
Well, I had some Bootstrap and a lots of Foundation background before using Semantic UI, and the transition was easy. Now, when I'm forced to use Bootstrap, everything seems illogical there.
So, working almost 6 months on Semantic UI, I learned some of the things that helped me:
When you get the hang of the semantics, it will be considerably easier. When Bootstrap forces you to use weird illogical abbreviations, then Semantic UI is natural language based. For example "ui inverted huge equal width form" will come out the way it sounds because you understand how things work together.
The docs. I think Semantic UI has superb docs with examples, so if you don't know how to do something, you find it from the docs. I've only encountered couple of things you cannot find from the docs (e.g. Nag).
There are some restrictions. For example, older Android, iOS and IE browsers are not supported because of the Flexbox. And there ARE bugs, so probably you have to fork and/or do pull requests and some Github issues and wait for a long time to have them fixed in main repo. Or rewrite some of the components (we ended up rewriting Sidebar because it didn't perform on mobile devices). But we didn't really see point in supporting legacy stuff that much anyway.
The box model and positioning is different to what you've used to in Bootstrap, but in a way, it's a lot simpler when you get the hang of it.
Don't expect a lots of helper classes, write them your own.
Learn to use LESS, Gulp etc. from day one - it will save you from lots of headache and will increase your productivity. Also extending/overwriting Semantic UI is a good idea, when you want your own design.
All in all, we had issues, but looking back, we actually won in development time, because Semantic UI has most all the tools available you need to develop modern UI.

Requirements for learning Cocos2D?

I would like to make a 2D iPhone game, I've done some research and Cocos2D does seem like the best option, I am just wondering how much knowledge of Objective-C I will need before tackling Cocos2D. I know the fundamentals of programming in Objective-C - I can make a basic command line tool app. I've done some iOS SDK tutorials but I wouldn't know how to make an iOS app if I was asked because the tutorials I'm currently following are about three years old.
What is required as prior learning before using Cocos2D and does anyone know of any good resources? I'm more of a visual learner so I find videos more helpful than books or blog posts.
Thank you in advance for your time and any help :)
There is no required prior learning. Use it. If you get stuck on something, look it up, google it, or ask a question.
Meaning: don't waste your time learning general concepts without actually being in the situation of having to apply them.
Analogy: you don't need a PhD in mechanical engineering to drive a car - though it might help when you run into any issues. But in such a case just do what 99% of all people do: call for help. It hardly makes any sense to first learn the potential problems you can have with a car, you deal with them as they happen.
Also: frustration is part of the game and can not be avoided. :)
how much knowledge of Objective-C I will need
A lot. You need to master Objective-C before trying to make a bigger project like this.
And to understand Objective-C, you need to have a very solid knowledge of C.
(Also, for using 3rd-party frameworks lile Cocos2D, make sure you understand well the basic, default libraries such as Foundation and UIKit.)
For making games like Free flow , having an intermediate knowledge of Objective-C is sufficient. But if you plan on make something like Temple Run, then you need really good knowledge of Objective -C,Open-Gl and cocos2d..
The site I would recommend is raywenderlich.com, that's where i started from and they have tutorials from really basic level to really advanced level.
Hope this helps
The answer to that depends truly on who you are, your work ethics, and how much effort your are ready to consent to that effort. I would argue that if you have solid foundations with other OO language/frameworks, your quest is possible. I would start by 'repurposing' a freely available game ( you will find many good examples and tutorials from Ray Wenderlich and also Steffen Itterheim. Pick a sample project that is not too 'distant' from your game specification, and repurpose it. In doing so, you will break-in to objective-C and some of the basic frameworks you need to comprehend. Mastery will follow if you are dedicated and stick to it. Also, SO rules : many answers are available here : appropriate questions will yield many helpful hints and solutions to point problems.
ps. My biggest learning curve turned out to be xCode, a truly arcane and dogma-ladden IDE. I since switched to another IDE and my productivity has gone back to respectable levels.
I recently picked up Objective-C and cocos2d at the same time. I did a lot of reading about objective-c in the beginning to give me a primer. Aside from the syntax, most of that knowledge remains unused in my game. The most important things to learn about objective-c before starting in on cocos2d tutorials are, memory management, and debugging.
The reference count memory management might take a minute to get used to depending on what languages you are coming from. The general rule is, if you alloced/copied (without autorelease) or retained it, you must at some point release it, and if you need to use something beyond the current scope, you should retain it. You can see from some cocos2d examples of overwriting an objects dealloc method in order to dealloc anything you created/retained.
The debugging took me a minute to get used to as well. It helps if you add a high level try/catch block that you can use to log uncaught exceptions, otherwise some of your errors will give you little info to go on. You may also want to research/mess with some of your project settings to allow for better bug catching, such as enabling zombies. A big causer of crashes in objective-c is sending messages to already dealloced objects. Once you come across a badaccess error that you can't figure out, you will basically be forced to get knee deep in this stuff in order to figure out the cause.
Some other purely objective-c knowledge that will come in handy are getting very familiar with how NSArray and NSDictionary objects work, how they automatically retain/release, and how they can only hold objects (no primitive values). To work with floats/int and arrays/dictionaries, you need to convert primitives into something like an NSNumber object, which can be done fairly easily with a little research. Another helpful too is knowing how to save/load plists. There are convenience methods for doing this on NSArray and NSDictionary objects. This along with a little knowledge of the NSFileManager should be enough to help you save/load game states. If you want to get really fancy/clean in your coding, you will also learn about observers in objective-c. KVO can be great for making your UI update automatically on a certain objects property changes. For instance, my HUD KVOs the player object's life, so that when the life value changes, the HUD automatically updates. This can allow you to make a cleaner MVC type application. You can also register to listen to other types of messages (not just property changes), just make sure to unregister your listeners when you are done listening.
My last bit of advice would be to always pay attention to XCode warnings. If you are getting one, and you don't know why, you should figure out why. Some simple ones you might be able to ignore, others may cause bugs that you will not be able to track down any other way. For instance, I once used the function max() in my code, and xcode gave me a strange warning that I didn't understand. This caused havoc on my program by corrupting the stack. When I changed max() to MAX(), three or four unexplained bugs instantly disappeared. This kind of thing can set you back weeks, and take serious combing through every piece of your code if you don't catch it right away.
The rest can mostly be learned by looking at cocos2d code/examples. Good luck.

Need general directions to the idea for 'Bookshelf' app - table or scroll?

I'm currently stack at creating an app.
Our requirement is to make "book viewer" app similar to the iBooks. Each of the book is just series of images (JPEG or PNG) and not a pdf. So it's more like an image viewer in a sense.
The main view is going to be like "horizontal tableview", which the user can scroll horizontally the covers of the books, click it to download and open the book (which led to another page view). The row for the cover should be at least two since there's two "type" is set for the books. This part is more like a "pulse-style" bookshelf with UI similar to this.
When I thought of how to implement this behaviour, I found the way with UITableView just as described here. However, as an objective-c beginner, it's little complicated for me to use this, and our requirement has also each "cell" must have multiple buttons to set each book as "favourite" or "downloaded" etc... and this could be more complicated if I choose to use the UITableView.
So I came to think of using UIScrollView to line up the book covers, embedding each cover as an UIImageView with buttons. But I really don't know if this is the right direction, sicne the UIScrollView has no "reload" function, and the requirement also stated that the user should be able to find the books by using "search bar" at the head of the bookshelf view.
As you can see, I'm completely confused and depressed because I don't know how can I achieve this. I searched around google and several answers here at stackoverflow suggest using AQGridView or EasyTableView. They are both great, but again too complicated to implement these into our requirement...
Which way, or how should I implement this dynamic "pulse-style" bookshelf like feature?
I think my question is a bit vague, but I'm also not clear what to ask here because I really don't know how to do this. The Android version of this app is already achieved this requirement with fairly simple and easy to understand codes (since I have some experience in Java), but for this Objective-C, everything seem needlessly complicated...
Any help would be appreciated.
Thank you.
<preachy>The fact is that you have made a mistake by trying to make this app with a complex interface full of non-standard UI components when you are “an objective-c beginner”. I understand that this may not have been your decision; it may have been forced on you by the guy that signs your paychecks. Nevertheless, it is not reasonable to expect that you can just implement this app before you've spent the time working through tutorials and reading documentation for the programming language and libraries required to build it. We all have to learn the alphabet before we can start writing limericks.</preachy>
That said, if your app can require iOS 6, and you can take the time to learn a bit of Objective-C and iOS programming, it sounds like this would be pretty easy using UICollectionView. Apple did a couple of sessions about this powerful new class at WWDC 2012. I recommend you watch the videos:
Session 205 - Introducing Collection Views
Session 219 - Advanced Collection Views and Building Custom Layouts
You can also easily find some tutorials about UICollectionView using your favorite search engine.
Take a look at Collection View's
You can even download some sample code to see how a grid layout can be accomplished.

Fundamental Architecture of an iPhone App: what does exactly happen?

I am new to iPhone-Programming and I am probably asking a beginner's question, but I really couldn't find a satisfying answer to this:
I would like to understand the underlying architecture or structure of an iPhone App. What comes first, what are the parts that a starting template usually does automatically? In C-Programms, you know the program always jumps into main and then everything starts like you coded it. In iPhone-Programming, we start also in main and then something like the event loop starts and etc.there is a lot going on under hood, which I would like to understand so I feel more confident writing code and actually being aware of all consequences that my code causes.
I would be happy about any answers or are there any good references that are compact and only focussed on the coding architecture?
Read this for example ... http://www.technolike.com/archives/86/core-application-architecture-for-iphone.html ... and Google for more. There are many resources how to iPhone application starts, what's going under the hood, how event handling cycle does work, etc. Also when you read these resources, try to ask more specific questions. It's too broad question to answer everything.
I suggest that you browse through Apple's documentation on iOS development: http://developer.apple.com/library/ios/navigation/
If you want to learn the low level stuff first, perhaps you should look into how Objective C works and then move to learn about UIKit (which is the central framework/library for iOS app development).

Record Sound in Cocoa Example Please!

I've been scouring both this site and the net in general for an example cocoa app that uses QTKit or Audio Queue and actually works.
Unfortunately, I can't find anything that fits the above description.
All I want to do is get a simple audio recording app so I can learn how it works!
Please, I have put alot of time into this already so don't point me to Apple Dev. It is just too dense for my simple brain.
And yes, there is a dupe or two here, but none of them actually produced a satisfactory outcome.
I am desperate! I feel like this should be WAY easier. I am starting to worry about getting deeply into Cocoa because the developer documentation is really not good.
Help!
It's not reasonable to ask people not to point to the documentation, especially when there is a step-by-step tutorial for creating a simple recording app with QTKit therein. It's titled "Creating a Simple Capture and Recording Application" with about ten steps (with code). If that's not enough, the Sample Code section gives you "MyRecorder," which is a ready-to-go media recorder using QTKit.
It's far easier to get help if you a) don't limit people by telling them not to refer you to a resource and, b) start with some standard resource and explain what it is that's confusing you or that's not working for you, so we have a starting point from which to offer help.