|
| 10-31-08 / 11:59 PM : ITMS boycot ? (cjed) | The site jaimelesartistes.fr, edited by the french Ministère de la Culture et de la Communication, and what purpose it to promote the new law against pirating, lists the legal music downloading solutions (Fnac, Virgin), those from majors, and finally a long list with some anecdotic offers, Apple's ITMS being listed in the last position (so far from visible, despite being more than 70 percent of US market, and between 30 to 50 percent in France).
Steve Jobs recently published an open letter, explaining while majors should remove the DRMs from online music distribution channels. EMI agreed but since, other music companies didn't respond, and now some would make us think that vendors like Apple are responsible from the added DRMs.
Finally, as reported here recently, the internet connections filtering isn't feasible technically, what makes the new law unapplicable. Worse, it would lead to arbitrary threats, without any need for proofs. We can hope that if it happens, iternet petitions will arise, and that the european commission will be taken again (the France position violates european agreements in that area).
And when the french government praises a site like Deezer as an easy and legal way to listen to music, we have to think that such economic model (ads or subscription) isn't satisfying for artists. We can't honestly pursue internet downloaders, and a the same time promote a new site coming from nowhere, that provides commercial music for free ! With the ITMS, Apple did found a moderated, elegant and practical distribution channel. Since 6 years, that platform allowed honnest gains to artists (if they deal directly with Apple - or through independant labels or CDBaby like companies). That famous economic model (70/30) leaded to the AppStore success, and benefits both to creators and end customers.
Comments at Clubic
s | 2 comment | 10-29-08 / 11:32 PM : Cappuccino Scrapbook Part II tutorial (cjed) | The second part of the Cappuccino tutorial, Scrapbook Part II
Implementing Drag and Drop, has been available for a few days. It deals with drag&drop, (that is exactly the subject of the chapter I'm currently reading in Cocoa Programming... page 760 : informal protocols for drag source and drag destination, etc.), collection views and scrollable views, archiving. | Post a comment | 10-28-08 / 11:29 PM : Windows 7 copies even more OSX (cjed) | Microsoft provided new details about Windows 7, expected in 2010. This version will be even more inspired from OSX old concepts (or new ones from Snow Leopard) : a new tasks bar that reminds a lot more OSX's Dock, a centralized files browsing system using metada named Library (that is OSX' smart folders), system acceleration through GPU (but fare more less ambitious than OpenCL and Grand Central), a new animations framework (probably far behind CoreAnimation), multi-touch management (still present in Leopard), etc. Windows 7 should however be more efficient on low end computers (that is 1Ghz... but OSX is still usable on even lower specs). | Post a comment | 10-27-08 / 10:23 PM : Google Earth for iPhone (cjed) | Google Earth is now available for iPhone (for free through the AppStore). It offers the same features as the desktop version. | Post a comment | 10-24-08 / 12:00 AM : Book : The iPhone Developer's Cookbook (cjed) | A book upon iPhone programming (besides Apple's great documentation) was released October, 15 : The iPhone Developer's Cookbook: Building Applications with the iPhone SDK. It is available for Safari Books Online subscrivers. It contains 384 pages (see the chapters list and some samples at Safari Books Online). | Post a comment | 10-23-08 / 12:24 AM : Android Market : a missed launch ? (cjed) | Google would have removed (without any notice) most of the 50 (only) applications on its Android market Store. Then only a dozen of applications remain on that sore. So, besides its very poor designed interface (years behind the AppStore), that store now really lacks content. | Post a comment | 10-18-08 / 03:05 PM : Special Event October, 14 : keynote video (cjed) | Apple's October, 14 Special Event keynote video is online (also in HD). | Post a comment | 10-17-08 / 11:38 PM : MacPro vs PCs bench under Windows (cjed) | PCMag provides a bench of the new Mac Pro 2,53 Ghz (under Windows, through BootCamp) and 3 other PC laptops (from Dell, HP and Lenovo). Desipte its lower processor cores frequencies, the MacPro left all the three PCs in the dust when running games (up to 4 times the fps of the 2,8Ghz Lenovo, and more than two times the framerate of the 2,8Ghz HP, that uses the same video chipset). In real world applications tests (conversion, rendering), the MacBook Pro shows very honnest results, considering its lower cores frequencies. | Post a comment | 10-17-08 / 11:25 PM : Snow Leopard beta 2 / Cocoa Finder (cjed) | AppleInsider confirms that a second beta of Snow Leopard has been sent to select developpers. The Cocoa rewrite work for system applications is far advanced, and the Finder is also concerned ! A new install (not really, more boot option) is included, that allows booting from disk images (without having to mount them nor restore them). Then we can manage a range of configurations, or beta versions easily. | Post a comment | 10-14-08 / 10:08 PM : New MacBook/MacBook Pro (cjed) | Apple presented new MacBook and MacBook Pro, that use a new manufacturing process for the case. The MacBook now onboards an integrated NVIdia GeForce 9400M chipset (uses 256Mb of DDR3 from the main RAM - 2Gb). Then 3D performances are 6,2x faster under Call Of Duty 4 (compared with performances with previous Intel GMA3100 chipset) ! The MacBook Pro also uses that GeForce 9400M chipset, but for common use. It includes a second NVidia graphics chipset, the 9600M GT (1,5x faster than the 9400M) for maximum performance, with 256Mb of GDDR3 on the 2,4Ghz model and 512 Mb GDDR on the 2,53 Ghz model (also adds 4 Gb ram instead 2, twice the cache memory, and a larger hard disk). A 2,8 Ghz processor is available as an option.
The new MacBook and MacBook Pro feature a new glass multitouch trackpad, larger, that can manage up to 4 simultaneous touch points, and the MacBook screen now also uses LED backlit. The MacBook Pro provides a better sound thanks to hundreds of openings at the keyboard sides. It also brings a mini-Display port. The MacBook now lacks the Firewire port, the main (only) limitation (for audio applications).
Prices are starting 1300$ for the MacBook and 2000$ for the MacBook Pro.
Apple also unveiled a new 24' LED Cinema Display (900$), that allows to charge a laptop, works as an USB hub and also provides speakers and an iSight.s | 2 comment | 10-13-08 / 10:05 PM : MacPro : Nehalem /BluRay in a month ? (cjed) | The release of Intel Nehalem processors is now announced for November, 17, that is months ahead expectations. Then we should see new Mac Pro before year's end : besides DHCP and Blu-Ray, they will probably sport a new case. Their price will have to be lowered for these to remain competitive compared with iMacs and new MacBook (should be priced starting 800$).
The Nehalem doubles the memory speed on dual cores (dedicated bus for each core, as with the G5), and will then allow 4 times faster complex calculations on 4 cores processors. | Post a comment | 10-09-08 / 11:13 PM : JSCocoa : call Objective-C from javascript (cjed) | Following Cappuccino, a new open-source project (developed by a french man) promoting Cocoa has been launched, JSCocoa. This javascript library uses JavascriptCore (the javascript engine from Apple's WebKit framework) in order to call C and/or Objective-C code from javascript.
Contrary to Cappuccino (that is a full rewrite of Cocoa classes in javascript, plus a dynamic compiler to convert at runtime Objective-J client code to standard javascript), JSCocoa provides a pure javascript syntax (that is less close to Objective-C than Objective-J). However JSCocoa brings some easy notations derived from Rubby and jQuery in order to simplify the syntax.
Finally, the end code executed is Objective-C (contrary to the Cappuccino solution), through ObjCRuntime, BridgeSupport and libffi. Then JSCocoa only works on MacOSX (10.5.5, PPC and Intel), what greatly reduces its interest. It would be better if Apple decided to release the ObjCRuntime on Windows, but it would sill require a porting of Cocoa classes (that is the YellowBox...) And then the bridge would be less useful (still the case on OSX, in fact it makes deployment of applications easier - only a browser needed - and paves the way for accessibility features, that is access to system fonctionnalities, an area where Cappuccino will have to use a similar bridge).
As it is only a bridge, the install only weights 1,3Mb (includes an example, JSCoreAnimation). The solution also allows to load NIBs from javascript client code, but IBOutlet and IBAction instance variables have to be defined manually in the code.
Then JSCocoa is simply an easier way to use the bridge presented some months ago, that is calling d'Objective-C from a WebView (Webkit view), through a WebScriptObject.
It is the third solution popularizing Cocoa in a few months, without counting the iPhone UIKit. | Post a comment | 10-09-08 / 10:39 PM : Apple : special event October, 14 (cjed) | Apple confirmed the October, 14 special event, where new MacBook and MacBook Pro should be unveiled (see The spotlight turns to notebooks message), that are said to use a new manufacturing process for the case. | Post a comment | 10-06-08 / 11:23 PM : iPhone dev ToolChain on PC / Eclipse CDT (cjed) | In March we learnt how to install the iPhone SDK (hidden APIs at that time) and make it work on Windows or Linux (GCC, etc.), and in September we digged in another article about installation of that so called iPhone dev ToolChain.
IBM now provides a tutorial about developing for iPhone using Eclipse CDT (C Development Tooling). It also requires GCC installation. | Post a comment | 10-06-08 / 11:12 PM : iPhone 0S 2.2 Google Street View / results (cjed) | As rumored by AppleInsider, the next 2.2 version of the iPhone OS would bring Google Street View.
Macnn reported that Apple would have sold 7 millions iPhones during the last quarter (Q4, financial results expected later this month), and the phone would have owned 17 percent of the smartphone market. | Post a comment | 10-03-08 / 12:18 AM : A Snow Leopard beta soon ? (cjed) | From AppleInsider, we learn that Apple may release soon a first beta of Snow Leopard, for selected (limited) audience however (not the whole ADC members). Among the dramatic optimizing (in speed and stability), Grand Central, OpenCL, ZFS, system size reduction (read that article) and QuickTime X, this version should bring a new multitouch framework. | Post a comment | 10-02-08 / 11:07 PM : Cappuccino TableView / datasource / pagination (cjed) | Among CPView available for now in Cappuccino we find : CPClipView, CPCollectionView, CPControl, CPFlashView (!), CPProgressIndicator, CPScrollView, CPShadowView, CPTabView, NSCustomView, NSView, _CPWindowView.
There isn't yeat any equivalent to NSTableView, NSOutlineView or NSBrowser, but the Cappuccino team is working on the implementation of a CPTableView :
"The CPTableView is still under development, it's already in the repository if you want to have a look. After this is finished i think the cappuccino team or someone else will pickup the work on CPBrowser."
It seems hard work due to these components complexity :
"CPTableView : needs all of NSTableView and supporting classes. We’re
not going to be using NSCell’s though, so we’ll also need to make some
decisions on exactly what to do here, at least when straight up NSView
replacement isn’t enough."
However that team still managed to write about 20 000 lines of code for Cappuccino's AppKit and FoundationKit.
Meanwhile they advice using a CPCollectionView (and CPCollectionViewItem), but then we have no column headers no rearrange feature (no column move nor resizing).
Once these hierarchical models display components are available, the Nib2Nic team will be able to manage the appropriate conversion, with the important (and impacting) difference that CPTableView shouldn't rely on Cell classes.
Usually enterprise applications rely on paginated table components in order to limit the requested data size (in a cursor way). With Cocoa TableView are included in a ScrollView, and only visible rows (at the current position, that is the current position of the vertical scroller) are loaded (requested to the datasource object). Then while scrolling, the datasource provides the additional rows only, never the whole table data (except when they all fit in the visible area).
Cocoa indeed dispatchs the rows on multiple pages when preparing the component for printing.
When the CPTableView will be available in Cappuccino, we will just need to implement the - (id)tableView:(CPTableView *)aTableView objectValueForTableColumn:(CPTableColumn *)aTableColumn row:(int)rowIndex datasource object's method. It will typically trigger a JSONP request to the server in order to retreive values for that cell. We will probably prefer maintaining a cache to avoid making a database request for only such a cell. In fact in that case the TableView model with scrollable view won't look appropriate (a tableView: objectsArrayForTableColumn: page: method would be better). Moreover, if we want to manage sorting (with ascending or descending order) - what is easily done in Cocoa -, we won't be able to consider the columns separately, and the datasource method will have to look like this (will return a cells values matrix) : tableView: objectsMatrix: forPage: sortingColumn: ascendingOrder:. | Post a comment | 10-01-08 / 11:26 PM : Apple drops the NDA around iPhone dev (cjed) | Apple dropped (sooner than expected) the NDA around iPhone development. Then exchanges, support forums and code examples should arise. Apple strategy has always been to unleash the iPhone potential step by step (at first there was HTML + javascript development only, then Cocoa but with NDA, etc.) The next step should be the opening of the iPhone filesystem (for now it is tied with the AppStore only). So Apple generates expectations and an interest peak each time they open something. In the hard economic context these last days (Apple's quote dropped 20$ down, before being up 8$), the company probably decided it was the time to use that mean, considering it will also help diverting developpers from Android. In fact Apple's competitors still own an ADC membership, and even participate to WWDC, so the NDA wasn't for patents concerns. | Post a comment | 10-01-08 / 01:06 AM : Cappuccino : JSON, JSONP & CPJSONPConnection (cjed) | Client applications based on Cappuccino communicate with servers (remote services) through basic HTTP requests, whose message content (body) can be in various formats, either XML (the schema as to be defined, there isn't any rule there - this is called XML-RPC) or the standardized and easy to read JSON format (isn't XML). The message could also be wrapped in a SOAP enveloppe, but it is less frequent (because more complex to deal with) when calling webservices from a rich client (especially if the caller isn't a Java program - wich is the case with Cappuccino, pure javascript - because we cannot then use generated Axis proxies). Then we will consider here that HTTP requests are originated from javascript client code (that is AJAX - the use of XMLHttpRequest javascript class), the only way to provide a partial refresh in the client-side page. The problem that arises is that, for security concerns, Ajax (XMLHttpRequest class) isn't allowed to make cross-domain calls, that is the domain of the requested url must be the same as the one from the current page (this is the case at Cjed Audio Home site : news uncollapsing/collapsing is done sending an Ajax request to a php script in the same domain).
In order to circumvent this limitation, a trick has been used, that is known as JSONP (JSON with padding). The point is to dynamically add in the page (through DOM) a script element of javascript type, whose source is pointing to the service url in the other domain. In this situation the cross-domain call is allowed. As we are in an AJAX call context, the end of processing on the server side (extracting news content, doing a search, etc.) must trigger a callback function on the client-side in order for the refresh to happen (use of the result). The second trick is to not simply return the result - in JSON or other format -, as it wouldn't produce any result on the client side (the call originates from a script include), but to return a javascript method call instruction - in javascript - (the famous callback function), with passing the result string computed on the server side as a parameter to that callback function call (this parameter can be in JSON or XML format). For example the result string will be myCallBackFunction( { "x": 10, "y": 15} ) if the process returns two integer values in JSON format. Then the interpreted result will trigger the callback javascript function on the client-side (possible from the script area), with the return result passed as a parameter to it. As for the server to know what callback function name to prepend at the start of the result string (myCallBackFunction area), we have to pass that information by adding an aditionnal request parameter to the service url.
Examples :
http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=YahooDemo &output=json&callback=callBackResult&query=searchValue
http://www.flickr.com/services/rest/?method=flickr.photos.search&tags=searchTag&media=photos&machine_tag_mode=any &format=json&api_key=ca4dd89d3dfaeaf075144c3fdec76756 &jsoncallback=CPJSONPConnectionCallbacks.callbackXX.
The name of the parameter that stores the callback function name varies depending on the JSONP service called (here callback for Yahoo and jsoncallbacl for Flickr), the same for another parameter that provides the result format (json).
We simply simulate here how the XMLHttpRequest API operates, without relying on in (because it cannot be used for security concerns)... but there is to know if it is a secure way...
Through the source code of Flickr Photo Demo Cappuccino application, we discover the CPJSONPConnection class.
It is instanciated (in the AppController class in that example) through the following Objective-J (javascript) instructions :
var request = [CPURLRequest requestWithURL:"JSONP service url"];
(this url contains a parameter that specifies the result format in the returned string, json here)
var connection = [CPJSONPConnection sendRequest: request callback:
"jsoncallback" delegate: self];
(for that service, Flickr JSONP, the parameter that stores the callback method's name is called jsoncallback)
In the CPJSONPConnection source code we discover that the CPJSONPConnectionCallbacks.callbackXX value is used as for the callback name (that is the value passed to the jsoncallback request parameter - that parameter name is an instance variable of the CPJSONPConnection class). This value is defined as a javascript function (stored in a javascript callback functions array) that contains the following Objective-J (javascript) code :
[_delegate connection:self didReceiveData:data];
[self removeScriptTag];
The connection: didReceiveData method is then called (when the returned javascript is interpreted from the script area) on the AppController class (defined as the delegate when using CPJSONPConnection sendRequest: callback: delegate: - we passed self). This delegate method, whose signature is - (void)connection:(CPJSONPConnection)aConnection didReceiveData:(CPString)data, can then directly extract informations from the returned string - data parameter - (JSON format here, that is the expected result - ie without the prepended callback method name).
If the called service url is hosted in the same domain as the current page, the previous JSONP mechanism isn't required, and we can simply use the XMLHttpRequest class, wrapped (hidden) by the CPURLConnection class (the call is then pure classical Ajax). We specify the delegate object during the CPURLConnection instance creation, using the following method :
connectionWithRequest:(CPURLRequest)aRequest delegate:(id)aDelegate
(the passed url parameter is built the same way as previsously, creating a CPURLRequest object)
However, as here the call will finally be triggered by XMLHttpRequest (will provide the callback method name - always the same) there is no need anymore to pass the callback method name to the service through the url (that information is passed to the XMLHttpRequest class, that manages the callback triggering). So the service only returns the JSON message in the resulting string (no need to prepend the javascript callback method name, we are in a classical Ajax call context).
We only have to implement, in the delegate object (typically AppController), the following method (this name is hard-coded as the XMLHttpRequest callback name in CPURLConnection class implementation, when the later start method is called) :
-(void)connection:(CPURLConnection)aConnection didReceiveData:(CPString)data
If the returned data string is in JSON format (and we use either a CPJSONPConnection or a classical Ajax call through CPURLConnection) we can easily deserialize that string into a structured javascript object, thanks to the CPJSObjectCreateWithJSON method :
Example :
-(void)connection:(CPURLConnection)aConnection didReceiveData:(CPString)data
{
var myJSObject = CPJSObjectCreateWithJSON(data);
...
}
For rich client applications, the requested business services are more likely to be hosted on other severs (and so other domains) that the client interface page, then the JSONP solution will be required.
If the server service is implemented in php, its returning string will look like this (considering the result part is in JSON format) :
<?=$_GET['jsoncallback']?>( { "greeting":"Hello from request."} )
Thread at cappuccino.lighthouseapp.com
Thread in a Google groups forum
Update : see also the CP2JavaWS Cappuccino client to Java remote services bridge, that allows easy call of remote business services, using provided proxy (client-side) and JSON servlet (server-side). It completely hides the CPJSONPConnection and CPURLConnection classes use, manages encoding/decoding and namespace of services methods’s parameters and return, call of a delegate handlers for success response and fail, in the same way (use syntax) as GWT does.
| Post a comment |
|