You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
1-1: In theory this makes sense. It practice it doesn't; at least on the Android side of things. For instance, where do services and broadcast receivers come into the mix? How do you save state when the phone's orientation changes or when the user switches to another task? Are you really going to shoehorn all of that logic into a model so that it remains device-agnostic? And are you preaching from an ivory tower or have you actually shipped iOS and Android apps? If you haven't actually shipped any apps, then you really shouldn't be recommending best practices.Jim G.– Jim G.2013-12-30 02:35:50 +00:00Commented Dec 30, 2013 at 2:35
-
I agree with you Jim regarding the business that is put in the model but I would also like to see what is your general approach on this? I don't want to see some sort of miracle code that fits with all the mobile projects, but I do consider that a low level architecture pattern should still be available for most of the projects. Thank you!Cata– Cata2013-12-30 09:47:05 +00:00Commented Dec 30, 2013 at 9:47
-
2@JimG. I’ve updated my answer. I hope I’ve addressed your concerns.Jeffery Thomas– Jeffery Thomas2013-12-30 16:00:12 +00:00Commented Dec 30, 2013 at 16:00
-
@JefferyThomas can you please elaborate little more on how to achieve your approach on this Model data and Business Logic?As you have said, Model must be able to encapsulate data related to an entity of the application we build, plus be able to validate data when it's used to contain data or transport data. In code level how to do this? Do you do the data validation within the model and passes the errors to the view if the validation failed? I can agree with you, but the question for me is how to achieve this in the code level when it's on iOS! Please guide!Randika Vishman– Randika Vishman2015-03-16 18:30:56 +00:00Commented Mar 16, 2015 at 18:30
-
@Vishman I hope my Objective C examples helps.Jeffery Thomas– Jeffery Thomas2015-03-17 11:12:21 +00:00Commented Mar 17, 2015 at 11:12
|
Show 1 more comment
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you