This topic is the answer to the Habrayuser
Malinnikov , the author of the topic
Steve Jobs about flash technology. Applied rhetoric , to which I wrote a rather capacious
answer . The question I was asked sounds like:
Do you think that the reasons for the ban flush on the iPhone technical.
How do you then explain that Apple has banned native applications created in a flash, but not requiring a flash player?
For my response to the original topic, I received a lot of pluses in karma and several requests from habrayuserov to write answers in the form of separate topics. Since the answer to the question was even more voluminous, I decided to follow the advice and issue it as a separate post (I’ll add a standard “first post, please do not kick if something goes wrong”).
')
And so, what is wrong with native applications made with CS5? Under habrakat I will try to explain slightly in more detail.
Immediately, I do not feel any personal dislike for the Malinnikov
habrauser, I think it is worthy of respecting the habrasoobshchestvo for merely writing volume material on an interesting topic, and it doesn’t matter that the material consists largely of false conclusions caused by a lack of understanding of the essence of the raised problem .
I'll start from afar.
The phrase “technical reasons for a ban” also has a kind of uncertainty. The root cause of any prohibitions (as well as the struggle against these prohibitions) is of course money, not technical problems. Another thing is how you feel about this. At least it's silly to scold Apple (Adobi, Google) for the fact that these corporations are in charge of their main business - making money.
Yes, Apple forbids flush because he does not want to lose profit. But not because in some way he is afraid of the flash as a competitor to his platform — especially the school’s reasoning about the rapid death of an appstore with hundreds of really high-quality programs against the background of myriad primitive flash drives — is trite because Apple leaves by selling a very unique, balanced consumer qualities of the product.
I hope you will agree with me that the vast majority of iPhone users are far from both the problems associated with the presence / absence of a flash, and the subtleties of the implementation of applications that they use on their phones. They are not worried about API problems, nor about the problems of bans and restrictions imposed by Apple on developers.
But they are exactly concerned about the battery life, brakes / glitches in the behavior of the phone and, perhaps, first of all, the clarity and predictability of the interface. This may seem trivial, but the principles that are inherent in the management of the iPhone, really brilliant. I have before my eyes a wonderful example of a small child who, of her own will, without knowing how to speak, learned to use an iPhone better than his own mother (even to call her dad / mother) - and this, I assure you, is not due to the fact that mother doesn’t understand the capabilities of the phone. Those who rush to prove to me that individually all the components were before the iPhone, I will answer that the brush and paints are available to everyone, but there was only one Michelangelo, one Raphael, one Leonardo, one Donatello. (yes, I know that Donatello is a sculptor, and all together - TMNT).
Therefore, let’s take it as an axiom that Apple sells iPhones in kilograms not at the expense of virtual qualities like “5 megapixel camera, 1 gigahertz processor”, but due to the fact that the product is really well made, a balance was found between the hardware and software those. The phone can not be divided into OS and a piece of iron, they complement each other remarkably well. Apps from appstore very organically complement this symbiosis, and note that they have no effect on the system’s behavior or its appearance - on the iPhone there are basically no crutches a la Spb Pocket Plus that are memorable to everyone who is familiar with Windows Mobile. As there is no whole class of system programs that allow, say, to make a webcam out of a telephone. Undoubtedly, advertising plays its role, but in this market, and in such an environment, you will not get away on bare advertising - Palma’s sad fate is an example of this.
As a result, some logical chain is built: Apple developed the phone, endowing it with certain qualities. The phone (predictably) began to sell well. Apple, as the owner of the platform, believes that the high sales of the phone are determined by the uniqueness of consumer qualities, which are the result of the fact that Apple controls both the hardware and the software component. Apple, as the sole and full owner of the platform, allows third-party developers to create a certain class of applications, a class that does not interfere with the basic functionality of the phone and does not attempt to control the phone bypassing Apple. Applications help Apple to sell the phone even better, developers get real money and have a vested interest in the fact that phone sales will continue to grow. In general, another mutually beneficial symbiosis.
And what about flash? A flash trite not embedded in this chain. Being a separate platform, flash is an alien element in this ecosystem, and, primarily, for technological reasons. I won’t even consider the idea of ​​the rapid death of Appstore, just think about why Google is not afraid for its Android app store, why the PSP still has native games with a flash, etc. etc. I will consider just one particular example, Jobs described common reasons in his letter.
We all know that dynamic programming languages ​​often carry a very solid runtime. Therefore, the question asked at the beginning is largely incorrect - “created in a flash, but not requiring a flash player” —in the case of a flash-natively compiled flash using CS5, this is not only a standard class library and memory management system, but also a subsystem rendering vector graphics, and audio / video codecs, and all sorts of other little things to the heap. Also, we all know that languages ​​based on garbage collection tend to be memory intensive. As a result, even some virtual minimalist program written in flash and compiled with CS5 takes a very tangible (by the iPhone standards) volumes both on the phone and in RAM. A good example is the game "kill the cockroach", shown last fall by Adobi's representatives at some regular conference. In addition to the gigantic size for such an application (about 20mb, if memory serves me, and the game consists of literally several sprites), it differed by no means at all the children's requirements for RAM, while managing to slow down no worse than it is done on large poppies. Yes, I know that this was the result of the CS5 beta, but something tells me (experience with Adobe products -?) That little has changed since then.
We also know that the new version of the firmware of the phone will support multitasking. Let us disregard the fact that what was taken to be multitasking is in fact a kind of suspend. Just remember that now the programs are not deleted from memory, but remain there in a sleeping state until the user either comes back (using the new control panel, or “running” the program again in the old usual way), or the system will not need more memory and it will start to unload the program based on the principle of "who did not use the longest, he is on the way out."
I also remind you that a memorable item about banning third-party frameworks appeared in the rules along with the introduction of the fourth version of iPhoneOS, and not at all before the release of CS5, as many are sure. I do not think that Apple is somehow obliged to synchronize their releases with Adobovsky, especially a preview of the capabilities of the new version of the iPhoneOS in the spring - (already) Apple’s tradition.
I note, Apple has been long enough to implement this pseudo-multitasking, and the slowness was probably related primarily to the fact that previous generations of iPhones (and iPods) carry only 128 megabytes of RAM on board, of which the developer remains free about 30 megabytes ( approximately conditionally far_not_always-mass_nuans). Apparently, Apple engineers thought that with such restrictions it was simply not realistic to make “multitasking” working well from the point of view of an unprepared user - instead of falling asleep, the program would most often just be re-loaded into memory, which, you see, is meaningless from the user's point of view.
In confirmation of my words, let me remind you that multitasking in the 4th firmware is supported only on the latest generation of devices with iPhoneOS, on current 3Gs and 3rd generation iPods, which have 256 megabytes of RAM onboard. For the time being, the number of such devices on the market was noticeably less than that of iPhones / iPads with 128 MB of RAM, so most developers continued (and still continue) to focus on the old limitations. I also specifically note that the resources are demanding in the first place games, regular programs have much more modest appetites, especially those that make the most of the standard interface elements and do not carry a lot of additional resources with them, as it happens with games.
And here on the scene appears restless Adobi with his omnipresent flush, which, as we know from the desktops, is basically ready to devour all available memory. Just remember that one of the main complaints from flashers (and programmers in general) to banning third-party frameworks is something like “I want to be able to quickly make a cross-platform program, but Apple does not respect my work, my time and need to spend time on learning your own SDK ", which translated into clear language should sound something like" I want the build for iphone button. "
Imagine for a moment that Apple still missed the natively compiled flash in the app. Submitted? I'll sign for the most likely scenario, somewhat apocalyptic, but nevertheless real:
a) An army of flashers (and this is really a very large group of individuals) will rush to make software for iPhone (“wow! real money is there, not pennies from kongregate and newgrounds”). And it doesn't matter that normal money in the app store earns only really high-quality projects, who doubts their own exclusivity?
b) Appstore in a short time will be overwhelmed with a lot of new programs that, hand on heart, are unlikely to be noticeably worse or better than most of the existing junk there - in the end, the quality is not determined by the platform, but by professional skills.
c) What is more important from the point of view of Apple is that these programs will be noticeably more demanding of resources. And if in the (pseudo) single-tasking system such applications are unlikely to greatly harm the image of the platform, then in a multitask environment this will be characterized by a capacious word disaster, simply because the average user on the drum is responsible for the fact that his programs are often restarted instead instant waking up. Once multitasking works crookedly, then Apple is to blame. The multitasking curve negatively affects user satisfaction, which gives an extra competitive advantage (for example) to android. All this ultimately will affect the sales of Apple, and Apple is quite a capitalist corporation, the only reason for the existence of which is to "make money".
Summarizing, in order to add such a feature as long-awaited multitasking, Apple really has
to protect himself from trying to cling to the slim iPhoneOS ecosystem, as Adobi wants. I note that this is not class hostility on the part of Apple, this is quite a normal desire to protect what brings you income, and the reasons for such a defensive reaction are
technically justified . I am not a fan of labeling, but in this situation, my sympathies are definitely on Apple’s side, as Adobi simply wants to cash in on the results of other people's work, while using a very dirty trick - skillfully manipulating the feelings of ordinary developers who are somewhat far from understanding the true state of affairs.
After all, just think about it, for two years in a row Apple made it clear that the flash is undesirable on an iPhone, but bright minds in Adobi decided to follow the “not at the door, so into the window” method. As a result, they ran into a response and rushed to the police demanding to marry, since “it seemed to the lady that they made eyes at her.” It would be a good story for a comedy, if it were not so sad ...
PS:
Having read the corrosive reader to this place, one may ask - why there is so little RAM on the iPhone at all? The answer is simple - any restrictions on mobile platforms are related to battery life. At first glance, it may seem that RAM should make an insignificant contribution to the overall consumption of electricity, for example, in comparison with the screen, but in fact this is a misconception. Modern smartphones use SDRAM, on the iPhone this is DDR SDRAM, and this type of memory, as is known, requires constant updating of the charge of the capacitors that make up the memory cells. The more RAM, the higher the charge maintenance charge. And if the screen of the phone consumes energy only at the moment of use, and the CPU can fall asleep and wake up while typing sms, then RAM always needs power, even in the deepest sleep (you can read more on Microsoft Windows Mobile Blog about 4 years ago there was a wonderful article on this topic).
Moreover, the fact that the user feels like the “speed” of the smartphone, 50–60 percent of the commercials are due to the type of RAM and the frequency at which it works. According to rumors, they put DDR2 in the ipad, which apparently explains the excellent speed of this device. And the frequency of the processor is more of a marketing ploy, just like camera megapixels.
Amen.