AJAX-Tips Tutorials
AJAX-TipsManipulating View through Screen Object
Aside from interaction, the looks of the application has also gained a lot of attention from developers in the past few years. Gone are the days where JavaScript and Ajax are solely for efficient use of online applications. Today, applications have to work as expected and should also provide an aesthetic experience. Others are simply aiming to have a good looking website aside from an efficient Ajax based application.
Catering to the demand of users and developers, JavaScript and Ajax comes with screen object. As the name suggests, this tool will allow developers specify the experience based on the looks of their online application in the browsers.
Automated Generation
While the screen object can greatly improve the looks of the application in the browser, it's often an ignored object and rarely used by developers. But that doesn't mean that it doesn't exist in every Ajax or JavaScript based application. Every time the application is created with this programming language, the JavaScript engine in each browser searches for properties related to screen object. If there are no commands that will change the interface of the browser, the JavaScript engine within the browser will generate the screen object.
Properties for Screen Object
availHeight and availWeight Properties - this property will determine the pixels that will be generated in the browser. The height and the width should be implemented at the same time or else the browser will never provide the expected look.
Width and Height Property - the previous property is geared towards specific quality of the browser when the online application is launched. This is different from the previous property since this determines the actual size and not the quality of the screen through pixels.
Color Depth and Screen Pixel Depth
The color depth property is used by developers when they are specifying the color palette of the browser. But this property is optional and when the browser does not detect any objects related to color palette, it will try to look for screen pixel depth. Developers can use this property to implement a higher contrast in colors.
These properties are practically functions that allow developers to implement some customization on the looks of their online application. But these properties do not intervene with the functionality of the application. This is also the reason why some developers opted to ignore this object since the browser can provide the right properties for screen object.
Methods in Screen Object
The methods in screen object cannot be implemented independently from the properties. This is where the functions of the application interact with screen. The objects of the application determine the method of the screen object. The screen methods can be on "watch" when the screen has direct interaction with the application. The screen object can also be "unwatched" if the screen object do not have any direct relation with the application.
The screen function is an option object for Ajax and JavaScript. But this function can be used by developers to improve the looks of their online application.
Sponsored Links
