Articles Tagged 'CSS'


Reverse Engineering: the compressors code

A neglected issue in the context of Web2.0 is the protection of source code. With the perspective Open Source, Web 2.0 is where its greatest expression in the beta, share and participate in the community surely leaves in the background issues related to protection of source code. Let us recall that the Javascript scripts are downloaded from the Web Server into the browser as text files, so totally visible to the end user.
While the code server is protected by definition (it is impossible to access the code of a PHP page using the HTTP browser, except for rare cases of malfunctioning of the Web Server), client code could be subject to a Reverse Engineering.

However, there is a simple protection designed, from its beginnings, the size of the script for dimuire Javascript; now become real framework in some cases.
There are indeed applications and Web sites that allow you to compress (crunch) the Javascript code, but not only. This feature, in different ways, can also be applied to HTML and CSS. The JavaScript code, in particular, in addition to being compressed can be hidden, thereby obtaining a protection of the code (in view) such as to make more complex the procedure of reverse engineering.

Differences between HTML, CSS and Javascript are important and substantial. While the compression of HTML pages and style sheets can only act on the Elimination of unnecessary or superfluous characters, such as 'head', 'double spaces', etc. ... Javascript is a programming language that can then run a special code unzip himself.

JavascriptCompressor.com is a free service that can be used online, which allows you to compress JavaScript source code. The options make it extremely versatile, while providing the darkening of the code.

For example, startup code:

1
2
3
function MyFunction () {
"Hello World" ) ; alert ("Hello World");
}

Code with simple compression:

1
alert ( "Hello World" ) } function MyFunction () {alert ("Hello World")}

Encoding standard:

1
5 , 5 , 'World|Hello|alert|MyFunction|function' . split ( '|' ) ) ) 3 () {2 ("1 0")} ', 5, 5,' World | Hello | alerts | MyFunction | function '. Split (' | ')))

Obviously this is an example, with small codes compress not really make much sense, you risk making things worse and that's it (unless you're only interested in code obscuring the view).

Compressor MemTronic Cruncher is also an online service (such as previous work in offline mode), partially free in the sense that some functions are only available in paid version (as a function Obfuscade). Compared to precedende service should provide greater performance and safety in the Encryption code. I use them without distinction, as appropriate.

Peterbe.com does not allow Javascript to compress (except elimando spaces and 'head'), but proposes a compressor for HTML, CSS and XHTML. I, for example, the use to compress the sheets of styles.

Unless you use special algorithms for crunching, however, that weigh down the processing of data, you can always run a Reverse Engineering Code, that too compressed. Or soon or late, in fact, the original code must be sent to the interpreter's browser, which recognizes it (for now) only in the clear. In the future, with new versions of the browser, this obstacle could be overcome. It would be beneficial if it were implemented, within the browser, some technology capable of accepting pre-compiled JavaScript code, so to speak in binary (if anything encrypted ). In this way, the upheaval of the times download scripts, allowing a natural protection from reverse engineering and, last but not least, better performance in terms of script execution.

More ...

Xopus: WYSIWYG XML editor

Xopus is an XML editor (HTML) in WYSIWYG mode working inside the browser. I had already noticed some time ago, thanks to an article released on Ajaxian . I mention this now because it remains an attractive proposition in view web2.0/editor. It is an interesting experience! Xopus has developed really well (with Italian support), with an excellent implementation of the context menu, although still not fully cross-browser, the current release 3.1 is supported only Microsoft Internet Explorer (version 6 and 7 ) although developers have promised as soon as at least a version compatible with Firefox (February 1 has been released in alpha version 3.1.1 compatible with Firefox 2.0 +).

As discussed elsewhere, the question of compatibility (cross browser) via the browser, and penalizes slows the development of tools that, even without resorting to special technologies like Adobe Flash or Java applet, could bring a significant contribution to the Community! Conttibuto prevented - at last - from unnecessary internal battles of the current producers of browsers: IE, Firefox, Opera, Mozilla, Safari, ...!

Viewing the demo you can see something more than just HTML editors, to put the word poor. Xopus proposes both the traditional structure of the editor, and advanced features of Microsoft Word style. It is possible, in fact, inserted within the page real smart objects that meet certain characteristics, making Xopus a particular case.

As indicated on the website:

Xopus is a good solution for any business That has a back-end content management system and front-to-end publishing systems and Therefore Which two systems use the examination information. That structure to information, to make ends meet Both, Therefore is a must.

Poete watch the video demonstration that introduces the advanced editing features. Also you can try a demo directly.

More ...

Web2.0: Firefox 3.0 Gran Paradiso-and Apollo

It is available online version of Firefox 3.0 Alpha 2 , code-named Gran Paradiso. Among the features announced (the final version is expected in late 2007) we can use the browser in offline mode. All this reminds Adobe Apollo , which, despite not presenting himself as the browser, it evokes the essential features.

More ...

Net Software

It happened to turn the TV Net TV, as had happened to become the Radio Net Radio, not to mention the music! Now, as mentioned in other posts, it's official for the software to turn short in Net Software!

Adobe , which we know has recently acquired Macromedia, formalizes the Web Application - Web 2.0 - in real RIA (Rich Internet Applications) with the announcement of wanting to take on the popular Web editing software Photoshop. It is the latest ' agreement between Adobe   and Photobucket   to make available online a technology for video editing and remixing. Thanks to new technology developed for Flash 9 with ActionScript 3.0 , Adobe aims high, anticipating that within six months will be available online a version of Photoshop based precisely on Flash technology.

Indeed the new capabilities of ActionScript 3.0 (involving projects such as Flex and Apollo - also see Web2.0: Adobe is trying to Apollo and Ajax: Rich Internet Application ) makes it the perfect candidate for the implementation of true on the Web Ajax RIA , on the other hand, we see ousted from his throne in this new scenario. Despite the countless Ajax Framework, some of excellent quality, products over the past few years, Flash provides an environment more advanced and easy to manipulate. Also we talk about one of the world's most popular plugins: Flash has behind it a few years older than Ajax and derivatives.

Furthermore, it is obvious that Adobe Flash chooses, he being the producer now. However there are technical issues that may be considered - to date - only to be resolved in a harmonious way with technologies like Flash. Taking a look at the new ActionScript 3.0 we immediately realize the enormous potential for development offered by this new platform. The ECMA standard of language and new items made ​​available by the framework, allowing to reach a level of detail possible with previous versions of Flash: one of all, for example, the ability to access the bitmap data of an image loaded from hard!

The attack by Adobe seems svolgerersi then on two separate fronts that share Flash technology (which remember has always been the ability to actively interact with the browser and then using Javascript Client side and Server side scripting).

The first attack came from outside, on the browser side, where the technology Apollo is really proposed as an alternative to the usual kernel of different platforms, available today (Windows, Mac OS, Linux, etc. ...); use Adobe Apollo , then, instead browser for better performance and applications (RIA true) unthinkable, thus bypassing the incompatibility between Internet Explorer, FireFox and companionship. In addition, Apollo provides a single development platform, JavaScript-like Ajax, but without compatibility problems. This last point is a significant setback to technologies like Ajax, which still suffer enormously from cross-browser compatibility issues, do not forget, also, the whole issue to the output (rendering) graphical CSS!

The other attack takes place directly from within, hitting Ajax Framework with Flash card. The winning element in this strategy is the use of Flash, the Flash technology, which applies both in Flex , both in Apollo , in both standalone as we are already accustomed to seeing (simple SWF files for instance)! There is no doubt that this scenario is extremely appealing to developers, and Web. What becomes immediately realizable in Flash reusable in various ways, without forcing me to change a single line of code and, moreover, without worrying about compatibility!

All this, in my opinion, is an important step forward, a change of considerable proportions that also involves the world of games and Marketing. We'll talk again soon, make no mistake!

More ...

Web2.0: Adobe is trying to Apollo?

Apollo is the code name (for now) of an ambitious project in the world for Adobe RIA (Rich Internet Applications) and Web 2.0, including Ajax. Someone remembers Macromedia Contribute, Macromedia Central to someone else. There is, also, who sees in Apollo simple union - or opportunity - to bring together elements of Flash and PDF (something which has already been feasible with Flash Paper)!

More ...

Hide me

A feature of the sheets of styles (the files. Css) is that it can be specified depending on the average output. The Style Sheets allow you to specify the same class, the same the same ID tag, etc. ... for different media. For example, I can write a file. Css with the following syntax:

1
2
3
4
5
6
7
@ Media screen {
display : none } mybox # div {display: none}
}

@ Media print {
display : block } mybox # div {display: block}
}

non sarà visibile sul browser, sullo schermo, ma quando provo a stampare la pagina troverò un contenuto diverso da quello che mi aspettavo. What it comes at the end, is that the content of the DIV with id myBox will not be visible on the browser screen, but when I try to print the page, find a different content from what I expected.
Search engines, spiders, crawlers and aggregators, usually (for now) do not solve the css file. They are interested in viewing the content not the formatting. However, this technique could have interesting implications if not disturbing. Because of the characteristics of systems of indexing a situation like the one shown below would be at least curious:

1
2
3
4
5
6
7
"visibile_a_video" > < div id = "visibile_a_video">
p > < p > Content visible to video </ p >
</ div >

"visibile_in_stampa" > < div id = "visibile_in_stampa">
p > < p > Content visible in print </ p >
</ div >

Correlated with a file. Css like this:

1
2
3
4
5
6
7
8
9
@ Media screen {
display : block } visibile_a_video # div {display: block}
display : none } # visibile_in_stampa div {display: none}
}

@ Media print {
display : none } # visibile_a_video div {display: none}
display : block } visibile_in_stampa # div {display: block}
}

Google, for example, indicizzerebbe both the contents of our HTML, even if the screen would be able to see only one. If we print the page would find with surprise new content. The trick, however, would be revealed by eliminating the application of styles in browsers that support it. Normally no one performs an operation like this when surfing the Internet. Such an investigation would arise only after finding a mismatch between what is visible on screen and what was printed!

To date I have seen no cases of this type of blatant manipulation via CSS. At one time it was raising its visibility on the Internet by entering a series of texts, words, of the same color as the background of the webpage, so as to make such artifice dark eyes of navigators. By the time the engines are indexing cautioned against such "fraud". Maybe it's time to anticipate some joker before creating a precedent?

Currently, the style sheet are used to specify a range of media type of output. For a complete list see the W3C .

More ...

Web Developer 1.1.3

Chris Pederick releases new version of Web Developer , convenient add-on for FireFox and other browsers, which along with FireBug makes life better for Web developers.
Stumble this release for its good news compared to version much do. The toolbar icons have been redesigned, now much more effective. It increased the number of functions available on the menu as a handy magnify in real time, rules and guidelines, ability to edit the HTML. To be installed as soon as possible ...

More ...

Dynamic Javascript & CSS ​​File

In the Post Create an RSS Reader in PHP and Javascript indirectly we met a very interesting technique that allowed to create - in practice - a file from PHP Javascript.

More ...

Internet Explorer 7 (IE7): PNG and CSS still far away?

In Redmond must have some big problem on the uptake! It is wonderfully absurd that at the end of 2006 there are still the basis for a - well - approximate compatibility between IE7 and Firefox! Despite the official release - albeit with a limited set of locations - 7 of Internet Explorer, the page rendering engine still suffers from obvious flaws programming! Without going into many details averted list only two high profile bugs still present in this official release!

First of all NPCs are made ​​differently from GIF ... and, worse still, in absolute position undergo strange contours depending on how it runs on IE! Obvious bug? O madness of some junior developer?

On the CSS pseudo class: hover is still not supported on all TAG, although many take for the blog running! But which system? See W3C ...
A simple p: last-child is virtually ignored! Microsoft has rightly supported p: first-child. Now, if it implements the first thing that costs you implement even last? Mystery ...

The apex of the absurd, then, is obtained with bulleted lists! Hear hear! IE7 behaves exactly like IE6! From the series: you have brought with flawed code? Too many copy and paste of course! If definitie a list with the canons and a custom image as UL LI list-point, do not try to use a float element LI, the picture disappears mysteriously, just as they did on IE6! The one, needless to say, to make things right is the usual - old - FireFox!

Blog IE7 there are numerous complaints. Although it appreciated the efforts of the Microsoft behemoth to start a blog during the development of a software like IE7, however, remains the question of the effectiveness of this move. They really listened to the requests of users-developers? The blog has been opened with IE7 too late?

Once again we have to wait for a service-pack next adventure ...

More ...

Classes and ID in CSS

nei fogli di stile. Here are some brief tips on how to use class and id in style sheets. Keep in mind that once the use of advanced JavaScript techniques, such as the use of Ajax engines, may come into conflict with the recommendations made here! And in the end we will see why.

More ...



Stop SOPA