Can I get by by without ever using KVO? [closed] - ios

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Strange grammar, but I want to ask if there are cases where if I don't KVO (Key Value Observation), the app just can't do certain things/features?
Thanks

Key Value Observing offers functionality and behaviors that are unique and certainly useful to a developer, in same cases offering a glimpse at values that are otherwise opaque.
For example, if you want to know the precise duration of an animation in Cocoa that is otherwise a black-box (for example, the keyboard disclosure animation duration), KVO is the only way I know of that you could establish that.
Beyond that, it's a useful pattern for programming applications that involve data (go figure). As such, it is yet another tool in a developer's toolkit.
Can you get by without it? Sure. There are many tools you can get by without, and this one takes a little bit of effort to wrap your head around initially. But should you make a point of avoiding it? No, I don't think so - why would you?

You nearly never need KVO.
Only when you need some special things, or want to circumvent Apple sw design.
And for that few cases, you will find demo code, so dont worry about KVO much.

Related

NSNotificationCenter - Observer Pattern: Ok, but in mobile apps? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Why using NSNotificationCenter(ios) in a mobile apps. I mean I dont have many UI controls to update on a View. Also if I need to pass down to the caller of a View I would just use a delegate.
It might be justifiable in a logical sense if I have many Views in a Navigation control, and I would like to have each view down the navigation to update something - it is in situations like this NSNotificationCenter gets into play?
Thanks
Regards
In the situations you mention, you probably shouldn't use notifications -- it really doesn't have anything to do with mobile apps, the same criteria would apply to desktop apps as well. Notifications are best used if you need multiple objects to listen for an event, or in some cases, where two view controllers are far apart in the overall scheme of controllers, it's difficult to have one view controller set itself as the delegate of the other.

Can I use some method to get the variable name? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I creat a instance of a class. Can I use some method to get the variable name, then I print out it? I just want this when I do some test project. I think I really mean is the variable name.
Unfortunately, no, you can't.
Object instances don't have names. Classes have names. Methods have names. Properties have names. But object instances don't. Variables have names, but they're not unique to instances, and you don't have access to that programmatically, anyway.
If you just invoke the description method, you'll generally get a little something to identify the instance, but it's not a name.
UIView objects have a numeric tag property, so for those you can set that property and identify your controls that way.
property_getAttributes is part of the Objective-C runtime, as described here http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008048-CH1-SW1.
If you want to gain some kind of introspection about ObjC classes, it is the way to go. I don't think this is unstable, since the Objective-C runtime itself is quite stable. Furthermore there is an official guide (see link above) so you can trust it to be as stable as any other official Apple API.

Are there any high level explanations of how Zend Framework 2 all fits together? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am currently playing around with Zend Framework 2.
Do any of you know of any high level explanations of how Zend Framework 2 all fits together?
I am not talking about a tutorial which shows you how to quickly get a website up and running using ZF2; I mean an easy to read "behind the scenes" guide which explains which code does what. This could be a simple explanation step by step of how ZF2 starts a project, loads each module, does the correct routing and then sends the correct output to the user.
I know it is possible to step through all the code using the debugger, but for beginners this is very painful without first understanding ZF2's architecture.
Does this exist?
Possibly even some sort of architecture diagram or UML?
Thank you.
I watched this:
http://www.youtube.com/watch?v=NsOrT1R6IQ0
It basically goes over the DI, ServiceManager and EventManager and explains the theory behind the use of modules. It is quite long (45 mins or so) but it did give me a good general overview.
Hope that helps a bit :)
Most of what you are looking for (not all by any means) can be found in the Zend/MVC component reference.
However it is not very concise and user friendly.

facebook link recognizer for rails? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am developing an app that allows users to post to walls/groups very much like facebook or a classic forum. I really like the way you can post a link on facebook and the link will be recognized as a video, pic, or other media and will automatically display. Its a great feature b/c it keeps users on facebook instead of leaving the site. On that note, I was looking to implement something similar for my the app I am developing. Are there any rails plugins/gems that do this kind of thing?
Yes, I know how to google and have done so. I realize that I could write regular expressions to scan the link and then take an according action. However, I am looking for an existing implementation to save a boat load of time.
Any and all input would be appreciated.
Existing implementations would probably be employing some form of regular expression, although another approach is using custom "Markdown" syntax or BB code to make the regular expression easier.

Best practices asp.net mvc: working with images [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
what are the best practices to process images in enterptices web applications.
I mean
storing
assign with entity
fast loading/caching
delayed / ajax loading
suitable format (png, jpeg)
on fly editing (resizing, compress)
free libs/helpers
image watermarking/copyrighting on fly
Especially, appreciated already production approaches!
As always, every project has their own requirements, restrictions and resources (The 3Rs). There is no 'super pattern' or 'one size fits all' method.
We cannot tell you how to implement you project as every project is different. It's up to you to use your skills/knowledge and experience to make informed decisions on implementation.
The 'best practice' is to individually research and learn each of the technologies/methods you have listed and gain the knowledge to know when to use them based on your projects requirements, restrictions and resources.
I use ImageMagickObject in my mvc projects. It can:
suitable format (png, jpeg)
on flyediting (resizing, compress)
freelibs/helpers image
watermarking/copyrighting on fly
fast loading/caching: may be memcached?
delayed / ajax loading: jquery is a good solution
assign with entity: Entity Framework can work with almost all databases
storing: hard question. all depend to the functionality

Resources