简体   繁体   English

设计iPhone应用程序

[英]Designing a iPhone application

I am into designing a new iPhone application. 我正在设计一个新的iPhone应用程序。 My application is will contain almost all iPhone SDK concepts including core data, server integration, location services. 我的应用程序将包含几乎所有iPhone SDK概念,包括核心数据,服务器集成,位置服务。 Is there any design decisions I should keep in mind? 我应该记住任何设计决策吗? My plan was to go by designing a controller class for each iPhone app screen and also any utility classes to be used. 我的计划是为每个iPhone应用程序屏幕设计一个控制器类,以及要使用的所有实用程序类。 Any guidance will be really appreciated. 任何指导将不胜感激。

I forget who said this first, but it goes like this: The first project you do in any new technology will probably be very bad! 我忘了是谁先说的,但是它是这样的:您在任何新技术中所做的第一个项目可能都非常糟糕!

This is similar to these sage words from Fred Brooks - "Plan to throw one away; you will anyway" 这类似于弗雷德·布鲁克斯(Fred Brooks)的这些贤哲话:“计划扔掉一个;无论如何,你会的

So the best way is to wade right in, get dirty, light up the dark corners and learn what works for you. 因此,最好的方法是走进去,变脏,照亮黑暗的角落,了解对自己有用的东西。 Then you'll most likely have some very specific questions based on your experiences! 然后,根据您的经验,您很可能会遇到一些非常具体的问题!

This is a tough subject to talk about generally. 通常这是一个很难讨论的话题。 Design approaches that work for some will fail for others. 对某些人有用的设计方法将对其他人失败。

It would probably help to know more about what you are trying to do. 了解更多您想做的事情可能会有所帮助。 For a counter-example, I'm working on a game. 作为反例,我正在开发一个游戏。 I create an OpenGL context and from that moment on I'm managing assets like shaders, textures, mesh data, sounds,... . 我创建了一个OpenGL上下文,从那一刻起,我开始管理着色器,纹理,网格数据,声音等资产。 The way I've designed my project will pretty much be useless to you. 我设计项目的方式对您几乎没有用。

However the best advice that I can come up is to really figure out what you are trying to do. 但是,我能提出的最佳建议是真正弄清楚您要做什么。 Create mockups of your GUI and document workflows. 创建GUI和文档工作流程的模型。 Do sketches of GUIs. 做GUI的草图。 Become an expert in the domain in which you want your application to work. 成为您想要应用程序运行的领域的专家。 Develop a deep understanding of what you are trying to do. 深入了解您要做什么。

Once you have the GUI figured out, start working on the other end of the Model-View-Controller approach - figure out what data you need in order to provide the GUI that you've designed. 一旦确定了GUI,就可以开始使用Model-View-Controller方法的另一端-确定要提供设计的GUI所需的数据。 Not all data structures are equal. 并非所有数据结构都相同。 What's the best data design for the domain you're working on? 您正在使用的域的最佳数据设计是什么?

Once you have the view and model figured out you need to glue everything together with controllers. 一旦确定了视图和模型,就需要将所有内容与控制器粘合在一起。 There's lots of trick and traps here. 这里有很多技巧和陷阱。 Do you use threading to prevent the GUI from blocking? 您是否使用线程来防止GUI阻塞? Do you make direct calls to objects or do you decouple and use notifications? 您是直接调用对象还是解耦和使用通知?

But this is the public appearance of your application. 但这是您的应用程序的公开外观。 You might want to track usage data - consider what you wish to track and append that to your design. 您可能要跟踪使用情况数据-考虑要跟踪的内容并将其附加到设计中。 Errors happen, so think how to approach them. 错误会发生,因此请思考如何解决它们。

However, it's hard to be more detailed without more details than what you've provided. 但是,如果没有比您所提供的更多的细节,那么很难更详细。 Every application has it's own quirks and gotchas. 每个应用程序都有自己的怪癖和陷阱。 It's nearly impossible to talk about this in a general sense. 从一般意义上讲,这几乎是不可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM