Hot answers tagged

29

The API being designed follows the Rest style of resources-centric URI and CRUD operations mapped to HTTP verbs. This is your problem right here. You have limited your resources to (I'm assuming) the models in your database. As such it is taking ages to load all these resources because your server has no concept of resources that don't have a ...


25

It's mostly just throwing a big number out there because it impresses the masses. Bigger numbers are obviously superior so anything with a 64-bit processor is clearly better than something with a 32-bit processor. The new CPU is significantly better than its predecessor but, in Apple fashion, they're not going to try marketing based on tech specs - they're ...


19

'Store' in this context sounds very much like a Repository or Service. In that case, this is an extremely common pattern. The flaws/problems will vary with your implementation and the problem domain. On a general level, it sounds like the book is using 'Store' to represent a level of business logic + a level of data retrieval logic that handles a set of ...


18

"Store", in the case of MVCS design patterns, tends to lean towards storage logic. In the case of iOS, this is usually a Core Data implementation. If you create a Core Data-backed template in Xcode, you'll see the "Store" aspect of this design pattern tucked away in the AppDelegate class. To take this to the next level, I will often create a singleton ...


17

One of Apple's criteria for accepting a program is whether or not it makes calls to unsupported Apple API's (or other bad stuff). By requiring static linking, they can prove that the software does not make such calls. Allowing dynamic linking would allow any kind of behavior to be added later, which pretty much invalidates their approval process. Apple ...


16

To understand delegates, you have to understand protocols. A protocol is like a service contract. When an object (most often a UIViewController subclass, but not always) signs that contract, it is saying "I am interested in providing logic to back the message you send me". This is similar to NSNotificationCenter in regards to signing up for a level of ...


16

There is no "4GB wall" on ARMv7, as many ARMv7 cores support LPAE (Large Physical Address Extension), which is a concept symilar to PAE on x86, except LPAE uses 40-bit addressing. Meaning, that LPAE equipped ARMv7 can address up to 1TB of RAM. It's also important to mention that upcoming ARMv8 cores, including A7, will not use 64-bit physical addressing. ...


11

Nobody but Google knows why they made that decision, but here's my best guess: Android is an open platform, so there are a lot of different hardware configurations out there. Being able to emulate different hardware configurations is a big boon for developers, in that it greatly reduces the need to have actual devices to test on. This keeps the costs down ...


11

Let me show you my favorite unit test principles: A test is not a unit test if: It talks to the database It communicates across the network It touches the file system It can't run at the same time as any of your other unit tests You have to do special things to your environment (such as editing config files) to run it. A Set of ...


10

In this situation, code reviews would be a great way to spread Objective-C/iOS knowledge throughout the team, so that someone else can fix bugs when the iOS developer goes on a honeymoon/quits in a huff/gets hit by a bus/is moved to a higher priority project. Finding bugs is only half the value of code reviews. Spreading knowledge (about both the technology ...


10

Essentially you would need to proxy that web service with one of your own that does rate limiting. The devices wouldn't know anything about each other, and you can cache/re-implement the service if you need to scale further.


10

The View is the place which has intimate knowledge of your graphical runtime environment, of how color is expressed in it, and even of the fact that you are actually running within a graphical runtime environment and not as part of some unit test. (Assuming that you unit-test your Model, and your View Model, but not your View.) So, I would think that the ...


9

It is the naming convention chosen to be used in Core Data SQLite. There are several reasons why it was chosen. One of the main reasons is Z is one of the least used letters of the alphabet so they surely felt by pre-fixing table names and entity names with Z they open more options for developers to name their own tables with fewer chances of stomping on ...


9

When choosing a technology for multi-platform development there are some main issues to consider. The first issue is the quality of the application. PhoneGap, for example, is probably the most popular option for writing an application that works both for Android and iOS. But, of course, it has it's disadvantages (native languages wouldn't be used otherwise ...


9

Focusing solely on A7 being ARMv8 there is one obvious gain. ARM is rebooting their instruction set and architecture. Being backwards compability with ARMv7, next version also claims New instruction set (A64) Revised exception handling for exceptions in AArch64 state Fewer banked registers and modes So ARMv8 challenges ARMv7 on architectural differences, ...


9

As the co-founder of Codename One which does pretty much that I can answer that pretty easily. You can cross compile (which is what we do) but you can't have a single binary that will work everywhere because mobile OS vendors don't allow it. Apple doesn't allow JIT's and limits interpreters. All mobile devices include app isolation which prevents a global ...


9

Oh it's possible. It just doesn't look like what you want it to look like. What you're complaining about is the use of output ports1,2,3 to communicate results rather then returning results. Does this make testing more complicated? Yes. Then why do it? Because it gives you another layer of polymorphism. When you return, you're returning to the caller. You ...


8

There are two reasons. Apple wants to review all code that runs on an iOS device in order to ensure the quality of the overall platform. Obviously, in order to review the code, they need to have it. So, Apple requires that all code that is run by your app, needs to be either part of the app or part of the public iOS APIs. You can embed an execution engine ...


8

The reason is security as mentioned in this Stack Overflow question: The reason is security: since a dynamic library can be loaded and unloaded at runtime you could download additional executable code and load it (think plug-in). This could get compromised by a hacker and then having malicious code executing on your phone is a very bad thing. It ...


7

Jargon familiarity is something that should improve as you get more experienced, but even veterans will run into jargon problems sometimes -- not just at interviews, but as part of daily interaction with clients and even team members. The most important skill for such cases is the ability to ask for clarification. Even if you think you should know the ...


7

The question you should actually be asking yourself is this: is my code testable? If you find yourself writing elaborate tests or using elaborate mocks in your tests, it is the fault of the code under test, not the tests themselves. Unit tests test a unit of code. So it comes down to "what is a unit?" A unit, in general terms, is one small bit of clearly-...


7

I'm not interested in JSON, I'm interested in the objects that are created from JSON. Like in your example, turning plain JSON into objects is easy. How difficult is it for new developers? Mostly they are interested in the objects created. They can look at the code that turns JSON into objects, which is trivial. I looked at the JSON API spec, and I wouldn'...


6

Interface builder (and, as an extension, Xcode + Storyboards) has a built-in 'notes' section for any object in the hierarchy, which may be exactly what you need:


6

The same process would go for any development. I understand and agree it would be, little more work in a new technology, but once you create few test cases, you will be basically eyeing for same errors(Mathematical/Logical/) as in other technologies. So, List all the test cases. Discuss it with your peers. (Team Work is very important here.) If possible ...


6

There are some significant advantages to using native code over PhoneGap and other non-native languages. Obviously in your question you noted some of these already, but in the eyes of the consumer, these development advantages translate to customer advantages: Native languages expose all of the device's core functionality through direct APIs, compared to ...


6

I am only just approaching these questions myself but I will give the best answers I can and make some observations. We are told that iOS' MVC expects us to break our program up into models, views and controllers which link specific views to specific models. Sadly, in practice we will have a number of views and a number of models but only one (View)...


6

We can use MVVM to resolve this issue. The Model-View-ViewModel, or MVVM pattern as it’s commonly known, is a UI design pattern. VM takes all logic about preparing model data for UI from VC. Example: You have got model object with some fields, you want to format some of them, make calculation and combine them. In MVC case all that logic located in ...


6

Apple's sample code is just that, sample code. No guarantee that it works, that it is bug free, that it is the best way to achieve something. Use it to study some area that you don't know much about, until you are knowledgable in that area by yourself. And then throw the sample code away. Which is what you should do with any code that you find on the ...


Only top voted, non community-wiki answers of a minimum length are eligible