MacApp: Классикалық Mac OS үшін объектіге бағытталған құрылғылар жинағы
MacApp
MacApp – классическая Mac OS қосымшаларының нысанға бағытталған құрылғысы. 1985 ж. Object Pascal-дан C++-қа көшті. Adobe Photoshop-та қолданылды, бірақ 2001 ж. әзірлеуі тоқтатылды.
Ағылшыншамен салыстырыңыз: абзацты басыңыз — түпнұсқа терезеде ашылады. Абзац астындағы EN түймесі оны мәтін ішінде көрсетеді.
Мазмұны
Кіріспе
Классикалық Mac OS үшін объектіге бағытталған қолданбалық құрылғы. MacApp – Apple Computer компаниясының тоқтатылған классикалық Mac OS жүйесі үшін жасалған объектіге бағытталған бағдарламалық жасақтама. 1985 жылы жарық көрген MacApp, 1991 жылғы 3.0 нұсқасында Object Pascal-дан C++-қа көшті, бұл System 7-нің жаңа мүмкіндіктерінің көп бөлігін қолдауға мүмкіндік берді. MacApp, Adobe Photoshop сияқты көптеген маңызды қолданбалар үшін пайдаланылды. Алайда, 2001 жылдың маусым айында Бүкіләлемдік әзірлеушілер конференциясында (WWDC) нұсқасы көрсетілгеннен кейін, осы жылдың қазан айында барлық әзірлеме тоқтатылды.
Object oriented application framework for classic Mac OS. MacApp is the object oriented application framework for Apple Computer's discontinued classic Mac OS. Released in 1985, it transitioned from Object Pascal to C++ in 1991's version 3.0 release, which offered support for much of System 7's new functionality. MacApp was used for a variety of major applications, including Adobe Photoshop However, after demonstrating a version at Worldwide Developers Conference (WWDC) in June 2001, all development was cancelled that October.
Паскаль нұсқалары
MacApp – Ларри Теслер басқарған Apple компаниясының объектіге бағытталған қолданбалар құрастыру жүйесін жасаудағы алғашқы тырабы – Lisa Toolkit-тің тікелей мұрагері болды. Құралдар жиынтығының инженерлік тобында Ларри Розенштейн, Скотт Уоллес және Кен Дойл болды. Бұл құралдар жиынтығы Clascal деп аталатын арнайы тілде жазылды, ол Pascal тіліне объектіге бағытталған техникаларды қосты. Алғашқыда Mac үшін жасау Lisa Workshop-тағы кросс-компиляторды пайдалану арқылы жүзеге асырылды. Mac сатулары Lisa сатуларын тоқтатқаннан кейін, Mac үшін жаңа даму платформасын құруға күш салыныс жасалды. Lisa Programmer's Workshop 1985 жылы Macintosh Programmer's Workshop, немесе MPW болып өзгерді. Осы процестің бір бөлігі ретінде Clascal Object Pascal-ге жаңартылды және Lisa Toolkit, MacApp болып дамитын нұсқаулықтарды ұсынды. Apple 1992 жылы MPW Pascal қолдауын тоқтату туралы хабарлағаннан кейін, бұл нұсқа жаңартылмады, тіпті System 7 қолдауы да қосылмады, ал Pascal бағдарламашылары MacApp 2.0-ды PowerPC-ге өздері ауыстыруға мәжбүр болды.
MacApp was a direct descendant of the Lisa Toolkit, Apple's first effort in designing an object oriented application framework, led by Larry Tesler. The engineering team for the Toolkit included Larry Rosenstein, Scott Wallace, and Ken Doyle. Toolkit was written in a custom language known as Clascal, which added object oriented techniques to the Pascal language. Initially, development for the Mac was carried out using a cross compiler in Lisa Workshop. As Mac sales effectively ended Lisa sales, an effort began to build a new development platform for the Mac. Lisa Programmer's Workshop became in 1985 the Macintosh Programmer's Workshop, or MPW. As part of this process, Clascal was updated to become Object Pascal and Lisa Toolkit offered design notes for what became MacApp. As Apple announced it was dropping MPW Pascal support in 1992, this version didn't get updated, not even with System 7 support, and Pascal developers were left out on their own to port MacApp 2.0 to the PowerPC.
C++ нұсқалары
Осы уақытқа дейін, 1980 жылдардың соңында, нарық C++ бағытына қарай жылжыды, ал Apple C++ компиляторының бета-нұсқасы 1989 жылы MacApp 2.0 шығарылымымен бірге пайда болды. Бұл қадам Usenet және басқа форумдарда Object Pascal және C++ жақтастары арасында ұзақ және қызу пікірталас тудырды. Дегенмен, 3.0 1991 жылы шыққаннан кейін, MPW әзірлеушілік жиынтығы ескіргеніне қарамастан, белгілі бір деңгейде қолдау тапты. Apple кейін барлық әзірлеуші құралдар тобын қысқартты, нәтижесінде MacApp және MPW жеткіліксіз қамтылды. Бұл қысқартудың бір себебі Apple компаниясының "келесі ұлы платформаны" енгізуге жасаған ұзақ әрекеттері болды, олар көбінесе қандай да бір платформааралық жүйе түрінде көрінетін. Олардың алғашқы талпынысы Bedrock болды – Mac пен Windows жүйелерінде жұмыс істейтін, Symantec компаниясымен серіктестікте құрылған сынып кітапханасы. Алайда, екі тарап та бір-бірімен жұмыс істеуден бас тартқан соң, ол ұзаққа созылған өлімге ұшырады. Олардың проблемаларының бірі OpenDoc құру болды, ол өзі Bedrock-пен тікелей бәсекелесетін платформааралық жүйеге айналды. Bedrock-ты OpenDoc платформасы ретінде ұсынуға әрекеттер жасалды, бірақ ешқандай нәтиже болған жоқ. Осы оқиғалар орын алғанда, MPW және MacApp көбінесе назардан тыс қалды. Бұл жаңа жобаларды нарыққа жылдам жеткізу үшін әзірлеушілердің ресурстарын жұмсаудың маңыздылығын көрсетті. Бірақ Bedrock сәтсіз аяқталып, OpenDoc ыстық қарсылық таба алмағаннан кейін, Mac енді он жылға жуық уақыттан бері қолданылып келе жатқан және үшінші тараптың жаңа өнімдерімен бәсекелесе алмайтын құралдармен қалды. 1990 жылдардың басында MacApp-қа нақты бәсекелес айналған жаңа шеңберлер пайда болды. Бірінші кезекте Symantec компаниясының TCL қолдаушылар жинады, бірақ кейін Metrowerks компаниясының PowerPlant нарықты толығымен басып алды.
By this point, in the late 1980s, the market was moving towards C++, and the beta version of Apple C++ compiler appeared in 1989, around the MacApp 2.0 release. This move was subject to a long and heated debate between proponents of Object Pascal and C++ in the Usenet and other forums. Nevertheless, 3.0 managed to garner a reasonable following after its release in 1991, even though the developer suite, MPW, was growing outdated. Apple then downsized the entire developer tools group, leaving both MacApp and MPW understaffed. One of the reasons for this downsizing was Apple's long saga of attempting to introduce the "next great platform" for development, almost always in the form of a cross platform system of some sort. Their first attempt was Bedrock, a class library created in partnership with Symantec that ran on the Mac and Windows, which died a lingering death as both parties eventually gave up on working with the other. One of the reasons for their problems was the creation of OpenDoc, which was itself developed into a cross platform system that competed directly with Bedrock. There were some attempts to position Bedrock as an OpenDoc platform, but nothing ever came of this. While these developments were taking place, MPW and MacApp were largely ignored. It was more important to put those developer resources into these new projects to help them reach the market sooner. But when Bedrock failed and OpenDoc found a lukewarm reception, the Mac was left with tools that were now almost a decade old and could not compete with the newer products from third parties. Through the early 1990s competing frameworks grew into real competitors to MacApp. First Symantec's TCL garnered a following, but then Metrowerks' PowerPlant generally took over the entire market.
Ұзақ өлім
MacApp-тың негізгі әзірлеушілері 1990-шы жылдар бойы жүйеде белсенділігі төмен деңгейде жұмыс істеді. Apple компаниясының барлық "ресми" кросс-платформалық жобалары күйрегеннен кейін, 1996 жылдың соңында команда MacApp-тың кросс-платформалық нұсқасын ұсынатынын жариялады. Бірақ көп ұзамай Apple NeXT компаниясын сатып алып, OpenStep-ті Apple-дың негізгі даму платформасы ететінін, оны Cocoa деп атауын хабарлады. Cocoa сол кезде-ақ кросс-платформалық болды, ол алты платформаға дейін көшірілген және MacApp-тан әлдеқайда жетілген. Бұл Mac бағдарламашыларының наразылығын тудырды, олар өз бағдарламаларының «жазалау алаңына» жіберілгенін, яғни қолдаусыз қалдырылғанын айтты. WWDC'98 конференциясында Стив Джобс Cocoa-ға көшуге байланысты жағымсыз пікірлерге жауап ретінде Carbon жүйесін енгізетінін мәлімдеді. Carbon кейбір өзгерістерден кейін жаңа операциялық жүйеде ескі Mac бағдарламаларын іске қосуға мүмкіндік беретін еді. Metrowerks PowerPlant фреймворкін Carbon-ға көшіретінін хабарлады, бірақ Apple MacApp туралы осындай мәлімдеме жасаған жоқ. Осы кезеңде Apple-дың мінез-құлқына наразы болып, MacApp-тың адал қолданушыларының бір тобы қалды. 1990-шы жылдардың соңында Cocoa енгізілген кезде наразылық одан әрі күшейді, тіпті өнімді толығымен қабылдамауға дейін барды. Жағдай соншалықты нашар болды, MacApp қолданушыларының бір тобы WWDC'98 конференциясында өздері кездесу ұйымдастыруға дейін барды, Apple қызметкерлері бөлме беруден бас тартуы мүмкін болғандықтан, олар жалған атпен тіркелді. Apple бұл қолдауды байқады және 1999 жылдың соңында бұрыннан жұмыс істеп келген команда мүшелерінен құралған «жаңа» MacApp командасына жаңа нұсқаны шығару тапсырылды. Оған OpenStep-тен енгізілген көптеген жаңа Mac OS мүмкіндіктері үшін C++ орамаларының жұқа қабаты болған жаңа Apple Class Suites (ACS) және Project Builder-де құруға қолдау кірді. MacApp 3.0 Release XV 2001 жылдың 28 тамызында көптеген қолданушыларды қуантып шығарылды. Бірақ қазан айында өнім тағы бір рет, бұл жолы мәңгілікке тоқтатылды және MacApp-тың қолданыстағы нұсқаларына ресми қолдау көрсету тоқтатылды. Carbon-ға сәйкес келетін PowerPlant X 2004 жылға дейін шығарылмады, ал бүгінде Cocoa MacOS және iOS бағдарламалау үшін дерлік әмбебап құрал болып табылады.
The core developers of MacApp continued to work on the system at a low activity level throughout the 1990s. When all of Apple's "official" cross platform projects collapsed, in late 1996 the team announced that they would be providing a cross platform version of MacApp. Soon after, Apple purchased NeXT and announced that OpenStep would be Apple's primary development platform moving forward, under the name Cocoa. Cocoa was already cross platform, at that time having already been ported to about six platforms, and was far more advanced than MacApp. This led to strong protests from existing Mac programmers protested that their programs were being sent to the "penalty box", effectively being abandoned. At WWDC'98, Steve Jobs announced that the negative feedback about the move to Cocoa was being addressed through the introduction of the Carbon system. Carbon would allow existing Mac programs to run natively under the new operating system, after some conversion. Metrowerks announced they would be porting their PowerPlant framework to Carbon, but no similar announcement was made by Apple regarding MacApp. Through this period there remained a core of loyal MacApp users who grew increasingly frustrated at Apple's behaviour. By the late 1990s, during the introduction of Cocoa, this had grown to outright dismissal of the product. Things were so bad that a group of MacApp users went so far as to organize their own meeting at WWDC '98 under an assumed name, in order to avoid having Apple staffers refuse them a room to meet in. This ongoing support was noticed within Apple, and in late 1999 a "new" MacApp team, consisting of members who had worked on it all along, was tasked with releasing out a new version. Included was the new Apple Class Suites (ACS), a thinner layer of C++ wrappers for many of the new Mac OS features being introduced from OpenStep, and support for building in Project Builder. MacApp 3.0 Release XV was released on 28 August 2001 to the delight of many. However, in October the product was killed once again, this time forever, and support for existing versions of MacApp officially ended. The Carbon compliant PowerPlant X did not ship until 2004, and today Cocoa is almost universal for both MacOS and iOS programming.
MacApp бүгінгі күні
MacApp-ты 2001 жылы Apple қолдауын тоқтатқаннан бері, оны сақтап, жаңартып келген арнайы бағдарламашылар тобы тірі ұстап отыр. MacApp толыққанды Carbon оқиғаларын, Universal Binaries, Unicode мәтінін, MLTE басқаруын, DataBrowser басқаруын, FSRefs, XML талдауын, қолданушы басқаруларын, композиттік терезені, Drawer терезені, HIView терезені және қолданушы терезелерін қолдау үшін жаңартылды. MacApp-та HIObject және HIView үшін C++ орама кластары бар. Сонымен қатар, негізінен MacApp 2-ге негізделген Pascal нұсқасы Mac OS X және Xcode-ке көшірілді. Ол ұзын Unicode файл атауларын және автоматты байт алмасумен ағынды құжаттарды қамтиды. MacApp Xcode IDE-ді қолдайды. Шындығында, WWDC 2005-те Apple Intel процессорларына көшуді жариялағаннан кейін, MacApp-ты және MacApp мысалдары қолданбаларын Universal Binaries-ті қолдау үшін жаңартуға бір бағдарламашыға 48 сағат уақыт кетті.
MacApp is being kept alive by a dedicated group of developers who have maintained and enhanced the framework since Apple stopped supporting it in 2001. MacApp has been updated to fully support Carbon Events, Universal Binaries, Unicode Text, MLTE control, DataBrowser control, FSRefs, XML parsing, Custom Controls, Composite Window, Drawer Window, HIView Window and Custom Windows. MacApp also has C++ wrapper classes for HIObject and HIView. Also the Pascal version, based mainly on MacApp 2, has been ported to Mac OS X and Xcode. It features long Unicode filenames and streamed documents with automatic byte swapping. MacApp supports the Xcode IDE. In fact at WWDC 2005, after Apple announced the transition to Intel CPUs, it took a single developer 48 hours to update MacApp and the MacApp example apps to support Universal Binaries.
Сипаттама
Бұл сипаттама MacApp 3.0-ға негізделген, оның негізгі моделі 2.0 нұсқасына қарағанда жетілдірілген және көптеген маңызды жағынан ерекшеленді. Mac OS жүйесінің өзінде өте қарапайым оқиғаларды өңдеу жүйесі бар. Операциялық жүйеден қолданбаға жіберілетін оқиға құрылымында тек "перне басу" немесе "түйіншік шерту" сияқты оқиғаның түрі, оның орналасқан жері және басылған модификатор пернелері туралы ақпарат болады. Пайдаланушының жасаған әрекетін, мысалы, мәзір командасын таңдауын анықтау үшін осы қарапайым ақпаратты кодтау қолданбаның міндеті. Мұндай кодты шешу қиын болуы мүмкін, экрандағы нысандар тізімін қарап, оқиға олардың шегінде болғанын тексеру қажет. MacApp команда үлгісін пайдаланып бұл мәселені шешті, онда пайдаланушының әрекеттері оқиға туралы мәліметтерді қамтитын нысандарға енгізіліп, одан кейін оларды орындау үшін тиісті нысанға жіберіледі. Оқиғаны "тиісті нысанға" сәйкестендіру логикасы толығымен құрылымдық қағидалар мен орындалу уақытында жүзеге асырылды, бұл міндеттің күрделілігін едәуір төмендетті. MacApp-тың ішкі механизмдерінің міндеті – негізгі операциялық жүйе оқиғаларын қабылдап, оларды семантикалық тұрғыдан жоғары деңгейдегі командаларға аудару және содан кейін команданы тиісті нысанға бағыттау. MacApp авторды осы кодты жазудан ғана құтқарып қоймай, сонымен қатар бұл құрылым кодты командаларға, пайдаланушының әрекеттеріне және оларды өңдейтін ішкі кодқа бөліп, анықтап берді. Мысалы, "жасыл түске бояу" және "қызыл түске бояу" командалары болуы мүмкін, олардың екеуі де бір функциямен басқарылады – ChangeColor. Командалар мен өңдеушілерді анық бөлетін бағдарлама Apple терминологиясында "факторланған" деп аталады. Бағдарламаны факторлау Mac OS жүйесінің кейінгі нұсқаларында, әсіресе System 7 жүйесімен бірге маңызды рөл атқарды. System 7 Apple Events жүйесін енгізді, ол бастапқы Mac OS жүйесінің оқиғалар жүйесін, тек операциялық жүйеден белгілі бір қолданбаға емес, қолданбалар арасында жіберілетін әлдеқайда бай жүйемен кеңейтті. Бұл AppleScript жүйесімен біріктірілді, бұл оқиғаларды скрипт кодтарынан жасауға мүмкіндік берді. MacApp 3.0-да Apple Events тікелей пайдаланушының әрекеттерінен басталыптындай бірдей командаларға түрлендірілді, яғни әзірлеушіге Apple Events-ті тікелей өңдеу үшін көп код жазудың қажеті болмады. Бұл MacApp 2.0 сияқты бұрынғы жүйелерді пайдаланатын әзірлеушілер үшін үлкен мәселе болды, себебі мұндай бөліну болмағандықтан, Apple Event қолдауы көбінесе қалдырылып кететін. Өзінің қолданбалық құрылымдық қағидаларға сәйкес, MacApp сонымен қатар негізгі Mac GUI-дың көп бөлігін қамтитын алдын ала жасалған нысандар жиынтығын қамтыды – терезелер, мәзірлер, диалогтар және ұқсас элементтер жүйеде ұсынылған. Алайда, Apple көбінесе "нақты қолданыста" пайдалануға болатын жүйелерді ұсынудың орнына, қолданыстағы Mac OS кодының үстіне жеңіл қабаттарды қойды. Мысалы, TTEView класы стандартты мәтін редакторы элементі ретінде ұсынылды, бірақ TextEdit іске асырылуы өте шектеулі болды және Apple өзі оны кәсіби қолданбалар үшін пайдалануға болмайды деп жиі мәлімдеді. Нәтижесінде, әзірлеушілер көбінесе осы қажеттіліктерді қанағаттандыру үшін қосымша нысандарды сатып алуға немесе өздері жасауға мәжбүр болды. Кәсіби сапалы GUI нысандарының жетіспеуі MacApp-тың ең үлкен кемшіліктерінің бірі саналады. Бұл мәселе MacApp R16 нұсқасының шығуымен шешілді. MacApp R16 барлық MacApp GUI нысандары үшін стандартты Carbon элементтерін пайдаланады. Мысалы, Carbon толық Unicode мәтіні мен ұзақ құжаттарды қолдау үшін Көптілді мәтін қозғалтқышын (MLTE) енгізді. R16 нұсқасында бастапқы TTEView класы MLTE элементін пайдаланатын TMLTEView класымен алмастырылды.
This description is based on MacApp 3.0, which had a more advanced underlying model than the earlier 2.0 and differed in many significant ways. The Mac OS itself has a very simple event handing system. The event structure passed from the operating system to the application has only an event type like "keypress" or "mouseclick", and details of its location and the modifier keys being held down. It is up to the application to decode this simple information into the action the user carried out, for instance, clicking on a menu command. Decoding this could be difficult, running through lists of on screen objects and checking if the event took place within their bounds. MacApp provided a solution to this problem using the command pattern, in which user actions are encapsulated in objects containing event details, and then sent to the proper object to carry them out. The logic of mapping the event to the "proper object" was handled entirely within the framework and its runtime, greatly decreasing the complexity of this task. It is the role of MacApp's internal machinery to take the basic OS events, translate them into semantically higher level commands, and then route the command to the proper object. Not only did MacApp relieve the author of having to write this code, which every program requires, but also as a side effect this design cleanly separated code into commands, user facing actions, and their handlers, the internal code that did the work. For instance, one might have commands for "Turn Green" and "Turn Red", both of which are handled by a single function, ChangeColor A program that cleanly separated commands and handlers was known, in Apple parlance, factored. Factoring of a program was particularly important in later versions of the Mac OS, starting with System 7. System 7 introduced the Apple Events system, which expanded the original Mac OS's event system with a much richer one that could be sent between applications, not just from the OS to a particular application. This was combined with the AppleScript system which allowed these Events to be generated from scripting code. In MacApp 3.0, Apple Events were decoded into the same commands as if they had been initiated by direct user actions, meaning that the developer didn't have to write much, if any, code to directly handle Apple Events. This was a major problem for developers using earlier systems, including MacApp 2.0, which had no such separation and often led to Apple Event support being left out. In keeping with its role as an application framework, MacApp also included a number of pre rolled objects covering most of the basic Mac GUI—windows, menus, dialogs and similar widgets were all represented within the system. Unfortunately, Apple typically supplied lightweight wrappers over existing internal Mac OS code instead of providing systems that were usable in the "real world". For instance, the TTEView class was offered as the standard text editor widget, but the underlying TextEdit implementation was severely limited and Apple itself often stated it should not be used for professional applications. As a result, developers were often forced to buy add on objects to address these sorts of needs, or roll their own. The lack of a set of professional quality GUI objects can be considered one of MacApp's biggest problems. These problem has been addressed with the release of MacApp R16. MacApp R16 uses standard Carbon controls for all MacApp GUI objects. For instance, Carbon introduced the Multilingual Text Engine (MLTE) for full Unicode text and long document support. In R16, the original TTEView class has been superseded by the TMLTEView, which uses the MLTE control.
Белгілі пайдаланушылар
Adobe Photoshop бастапқыда MacApp 1.1.1 және Object Pascal тілінде жазылған, ал кейіннен Photoshop 2.5 нұсқасы үшін C++ және MacApp 3.0-ға көшірілді. Apple компаниясы MacApp қолдауын тоқтатқаннан кейін, Photoshop әзірлеу тобы техникалық қолдауды өз мойнына алып, PowerPC-ге көшіріп, Windows платформасымен ортақ пайдалану үшін өзгертілді.
Adobe Photoshop was originally written with MacApp 1.1.1, in Object Pascal, and later ported to C++ and MacApp 3.0 for Photoshop 2.5. After MacApp cancellation by Apple, maintenance was taken over internally by the Photoshop development team, ported to PowerPC, and transformed to be shared with the Windows platform port.