<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Saki's Blog &#187; Philosophy</title>
	<atom:link href="http://blog.extjs.eu/category/philosophy/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.extjs.eu</link>
	<description>For good of all productive developers</description>
	<lastBuildDate>Sun, 21 Nov 2010 01:36:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I would like to say, Thank you!</title>
		<link>http://blog.extjs.eu/philosophy/i-would-like-to-say-thank-you/</link>
		<comments>http://blog.extjs.eu/philosophy/i-would-like-to-say-thank-you/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 09:50:37 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[Philosophy]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=627</guid>
		<description><![CDATA[<br/>Recently I&#8217;ve received very nice Private Message on Sencha Forums from Sosy and I&#8217;d like to share it with you (with the author&#8217;s permission). Here it is:

Hello Saki, i would like to say, thank you!
I am new to ExtJS, comming from the PHP/MySQL side (still loving it, but its different already now) (sounds familiar?).
Started for [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Recently I&#8217;ve received very nice Private Message on Sencha Forums from <a target="_blank" href="http://www.sencha.com/forum/member.php?156557-sosy">Sosy</a> and I&#8217;d like to share it with you (with the author&#8217;s permission). Here it is:</p>
<hr />
<p>Hello Saki, i would like to say, t<strong>hank you!</strong></p>
<p>I am new to ExtJS, comming from the PHP/MySQL side (still loving it, but its different already now) (sounds familiar?).</p>
<p>Started for 3 weeks with ExtJS, didn&#8217;t like Javascript, cause to abstract for my eyes and head. Read a lot in this forum, started try and error, loaded a lot of <a target="_blank" href="http://examples.extjs.eu">examples</a>, tried to figure out why what works and how.</p>
<p>And above all, i am using a lot of your scripts to learn, i love it how you did things.</p>
<p>Tomorrow i started reading about Extjs again (that is my start in the morning, coffee (my own, because i am an coffeeroaster, Firefox, google -> ExtJS) And then read anything what i can find about it.</p>
<p>Bought a book, (ExtJS cookbook, which sucks, nothing in it to use for me) and so on.</p>
<p>But the highlight of tomorrow, or even better, since i started with Ext, was in your blog, found under philosophy.</p>
<p>First of all the <a target="_blank" href="http://blog.extjs.eu/philosophy/leading-comma-or-trailing-comma-that-is-the-question/">leading commata issue</a>, men, Saki i almost had spoken some curses on you as i start to struggle with your code and saw the leading commata. </p>
<p>What i thought was, geee, it says Author: Ing. Jozef Sakalos, well only an Ing. can be this abstract, no wonder that he can programm in Ext.</p>
<p>Then (i only admit this to you, but more on that later) i started to reorder your scripts, remove the leading commata. (*shame*). But for me that was a good start to go through the code, the calls and so on.</p>
<p>Now it comes, why i want to say thank you!</p>
<p>Then i read your second post under philosophy, <a target="_blank" href="http://blog.extjs.eu/philosophy/changing-viewpoing-to-ext/">Changing viewpoint to Ext</a>&#8230;</p>
<p>I started reading and, for the first time in 3 weeks i saw some light at the end of the tunnel, reading that you came from the PHP/MySQL side, and how you discriped the fact of what and how you assume it has to work, in reflect to Ext (exactly as how i see it) and on how it has to be.</p>
<p>This all together is changing my thoughts incredibly, even the leading commata thing, i still can believe that i will do that, because it looks really, really ugly for me, but i am also someone who can lay down old habits, if there are really good argumenst.</p>
<p><strong>Thanks Saki, you gave me hope on keep programming in Ext and try to learn it.</strong></p>
<p>Regards from an Dutch guy living in Germany,</p>
<p>Paul Willemsen aka Sosy.</p>
<p><a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/philosophy/i-would-like-to-say-thank-you/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Experience: Ext Component loading can be slow</title>
		<link>http://blog.extjs.eu/philosophy/experience-ext-component-loading-can-be-slow/</link>
		<comments>http://blog.extjs.eu/philosophy/experience-ext-component-loading-can-be-slow/#comments</comments>
		<pubDate>Sun, 12 Sep 2010 21:35:40 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[Know-how]]></category>
		<category><![CDATA[Philosophy]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=615</guid>
		<description><![CDATA[<br/>This spring I was contacted by one company with the request of consulting on their application developed in PHP and ExtJS Javascript Library. They wanted to come on site, stay with them one week and advise. I usually take such jobs but I always want to know what product is expected so I know in [...]]]></description>
			<content:encoded><![CDATA[<br/><p>This spring I was contacted by one company with the request of consulting on their application developed in PHP and ExtJS Javascript Library. They wanted to come on site, stay with them one week and advise. I usually take such jobs but I always want to know what product is expected so I know in advance if I can deliver it to the full satisfaction.</p>
<p>These guys succeeded to keep it covered and I was only told: &#8220;Come here and work with us for a week.&#8221; Being curious enough I succumbed to the temptation and taken the job.</p>
<p>The evening I came they had shown me a beautiful application with many windows, forms, grids, accordions. The application was very complex and I immediately knew that I&#8217;m going to work with pros. Uttering words of commendations I was still in a mystery because I still didn&#8217;t know what I was there for.</p>
<p>So I asked: &#8220;What do you expect from me that you were able to develop this alone?&#8221; They said: &#8220;Well, it is slow!&#8221;</p>
<p>Indeed, Ext window with a form and grid took around 4 seconds to show all it contents before the user could interact with it. And it was intranet! No slow internet connection bottlenecks.</p>
<p>&#8220;Yes, that&#8217;s too much! Let&#8217;s start tomorrow to find out why&#8221;, I said.</p>
<p>Next day I dug into the bowels of the application and I found that they generated javascript code on the server and then they loaded it to the client. I mean, not only JSON data but the full javascript executable code with the application.</p>
<p>I was not fully sure if this alone could cause the slowness so we started some profiling of both PHP and Javascript code and finally we decided to rewrite the application to adhere to <a href="http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/">Writing a Big Application in Ext</a>.</p>
<p>To keep it short, by the end of the week, when done, the very same Ext window opened in less than 500ms. Well done, isn&#8217;t it.</p>
<p>Anyway, what could be the reasons why it was that slow in the first place?</p>
<ol>
<li>The server needs some time to generate the javascript. It may not be a lot, however, if you count all database accesses, decision logic and javascript code generation it is probably more than to create a JSON string with data only.
</li>
<li>
The embedded javascript adds to the size of server-client data transfers. This didn&#8217;t attribute too much to the time in this particular case but it can get worse if the internet connection is slower.
</li>
<li>
The embedded javascript cannot be cached at client. If the application is in a referenced javascript file then, if the server is configured properly, it is cached at client. Of course, the initial load takes longer but then only the html markup and JSON data are actually transferred from the server.
</li>
<li>And probably worst: In this kind of loading a request is sent to deliver a component, let&#8217;s say a grid. The grid code is returned, the grid is instantiated and rendered and now it needs data. So another request is sent to deliver the JSON data. It&#8217;s just too much.
</li>
</ol>
<p>Take this please as <i>my</i> observation and <i>my</i> experience. There may be cases when component loading can work better and faster and I&#8217;ll be only glad if I&#8217;ll have an opportunity to see such application.</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><div class="paypal-donations"><input type="hidden" name="cmd" value="_donations" /><input type="hidden" name="business" value="js02@aariadne.com" /><input type="hidden" name="item_number" value="Blog Donation" /><input type="hidden" name="currency_code" value="EUR" /><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" name="submit" alt="PayPal - The safer, easier way to pay online." /><img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /></div></form>
]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/philosophy/experience-ext-component-loading-can-be-slow/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Leading Comma or Trailing Comma: that is the question</title>
		<link>http://blog.extjs.eu/philosophy/leading-comma-or-trailing-comma-that-is-the-question/</link>
		<comments>http://blog.extjs.eu/philosophy/leading-comma-or-trailing-comma-that-is-the-question/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 11:56:41 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[viewpoint]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=17</guid>
		<description><![CDATA[<br/>I have found another post that others could be interested in, originally posted on May 25, 2007. The original text follows:

As you may have noticed from code fragments I&#8217;ve posted on this forum that I&#8217;m using leading commas in my code. People keep asking me about reasons why I have decided so and if there [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I have found another post that others could be interested in, originally posted on May 25, 2007. The original text follows:</p>
<hr/>
As you may have noticed from code fragments I&#8217;ve posted on this forum that I&#8217;m using leading commas in my code. People keep asking me about reasons why I have decided so and if there are any positive or negative consequences of this so I have decided to write this article where I would explain my whys. What I would like to state at the beginning is that I do now want this thread to become a war of friends and enemies like some Linux vx. Window$, or Intel vs. AMD, discussions. I do not want anybody to change their coding practices because: The truth for you is that what works for you.</p>
<p>What works for me are leading commas. Why?</p>
<p>First, compiler or script interpreter doesn&#8217;t care if I&#8217;ve written leading or trailing commas. The only who cares is myself and other human beings that will read, understand, modify and debug the code.</p>
<p>So first comes reading and understanding. Lets take the following examples:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
    id<span style="color: #339933;">:</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span>
    useAccessibilityFeatures<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    autoLoad<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    <span style="color: #000066;">name</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'demo'</span><span style="color: #339933;">,</span>
    translateHelpTexts<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>In this example, if I want to check if I haven&#8217;t forgotten a comma or if I don&#8217;t have an extra comma there (infamous IE extra comma error) I have to look at the ends of all five lines with various lengths to see if comma is there and, in the case of the last line, to check that comma is not there.</p>
<p>&nbsp;</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
     id<span style="color: #339933;">:</span><span style="color: #CC0000;">2</span>
    <span style="color: #339933;">,</span>useAccessibilityFeatures<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span>
    <span style="color: #339933;">,</span>autoLoad<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span>
    <span style="color: #339933;">,</span><span style="color: #000066;">name</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'demo'</span>
    <span style="color: #339933;">,</span>translateHelpTexts<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>In this example I just look at the code as a whole if it has the expected appearance (first line w/o comma to the left and then column of commas).</p>
<p>You know, one line will always be different because number of commas is one less than number of properties.</p>
<p>The modifying of the code or putting some leading comments before the properties to temporarily disable them is pretty same in both cases. What makes bigger difference is a handling of errors I may have done in the code by browser. Let&#8217;s make an error in the examples:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
    id<span style="color: #339933;">:</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">,</span>
    useAccessibilityFeatures<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    autoLoad<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    <span style="color: #000066;">name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'demo'</span><span style="color: #339933;">,</span>
<span style="color: #006600; font-style: italic;">//    translateHelpTexts: true</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>What happens here? Please-help-my-app-works-in-FF-but-not-in-IE help forum query, waiting for some hours for reply and then not believing: How could I be that stupid?</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">//   id:2</span>
    <span style="color: #339933;">,</span>useAccessibilityFeatures<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span>
    <span style="color: #339933;">,</span>autoLoad<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span>
    <span style="color: #339933;">,</span><span style="color: #000066;">name</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'demo'</span>
    <span style="color: #339933;">,</span>translateHelpTexts<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And what happens here? Nice fat syntax error in both Firefox and IE with line number. Finding the line in the code and fix it is the matter of seconds and I can continue with some more important things.</p>
<p>I have better things to do as to hunt a stray extra trailing comma in the code for hours. And you?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/philosophy/leading-comma-or-trailing-comma-that-is-the-question/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Changing Viewpoing to Ext</title>
		<link>http://blog.extjs.eu/philosophy/changing-viewpoing-to-ext/</link>
		<comments>http://blog.extjs.eu/philosophy/changing-viewpoing-to-ext/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 12:38:35 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[viewpoint]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=5</guid>
		<description><![CDATA[<br/>I have found one of my older posts to Ext Forum when I have been with Ext for a couple of weeks, just after initial shocks of cognition that if I&#8217;m going to use this library I need to step out of my old habits and routines and I need to change my mind about [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I have found one of my older posts to Ext Forum when I have been with Ext for a couple of weeks, just after initial shocks of cognition that if I&#8217;m going to use this library I need to step out of my old habits and routines and I need to change my mind about web development.</p>
<p>I think that the original text is very useful for newcomers who would travel same or similar route as I had. There is one more note to it:</p>
<p>Ext made a tremendous step forward since I&#8217;ve written this article. Now, server not only does <strong>not</strong> generate an HTML markup for pages but also it is not needed to generate <strong>containers</strong> for Ext components. We can do very well with empty body: &lt;body&gt;&lt;/body&gt;.</p>
<p><em>The original post dated June 7, 2007:</em></p>
<hr />
I&#8217;ve been with ExtJS for a couple of weeks coming from PHP/mySQL world and I must admit that I had to totally change my viewpoint of the application design and I had to go through many trial-and-error attempts to achieve that something reasonable appeared on the screen with a behavior I wanted.</p>
<p>I&#8217;ve decided to write on this viewpoint shift to help others to move swiftly to the Ext concept from &#8220;the standard web design&#8221;. Believe me, you <em>will have to</em> change the viewpoint; be prepared that what you knew before is not valid anymore, prepared to forget the long-years-worked schemes, prepared that you will maybe need to throw away your hardly written, debugged nice PHP (or other) classes or functions.</p>
<p>Well, this doesn&#8217;t sound too good, does it? Is it worth to? Shouldn&#8217;t I stay in my ruts where everything just works?</p>
<p>Answer is simple: It&#8217;s up to you. Brave enough? Continue reading then.</p>
<p>What we are used to? First of all user has an URL to click. When he clicks the browser sends a request to the server. Server prepares the complete page with styling, pictures, tags, forms, labels and mainly with more links (URLs) and sends it back to the browser.</p>
<p>User then fills-in some data and when he/she&#8217;s done clicks submit. The new request travels to server, server processes the data and returns another full page (success or failure or new form), right?</p>
<p>OK, forget this! Except of the first request and first page returned it doesn&#8217;t work like this. (Well, it may but why to move to Ext then?)</p>
<p>How the hell it&#8217;s working then?</p>
<p>Good. We make the first request, something comes from the server but I wouldn&#8217;t call it a full page at all. It&#8217;s a kind of concept of to-be-the-page. Imagine you have a navigation on the left and main display are on the right. Yes, you have to load something there so the page is not empty but if you have more than on tab in the center you don&#8217;t need to load anything into inactive tabs. User maybe never clicks &#8220;third one&#8221; so why to run server script and transmit data of something that is never requested.</p>
<p>Now, user clicks something in the left navigation and we want to display it in the center. The request is sent to the server but it is different in that that it runs in the background without reloading the main page. When data arrives we just fill (with the great help of Ext) the main display area and we&#8217;re done.</p>
<p>We could (almost) say that one site equals one page, or better to say one concept or framework, and that we load the content into this framework on demand in the background.</p>
<p>Well and what about data?</p>
<p>The same! If we need to display tabular data we just use grid in the center and load it with data from server. Beware, when I say grid I mean grid created by Ext not some complex html table prepared by server and sent to client. The Ext grid is nice, full of features that the &#8220;classic&#8221; can only dream of (sorting, column resizing and hiding and many more) and the only thing it needs from the server is data.</p>
<p>The same is true for trees, views and other components.</p>
<p>And what about sending data?</p>
<p>This was my major pain in the transition period. I kept looking for forms, hidden fields, field names and all well known things wondering why I had troubles to find some. Yes, they exist but concept of form full of inputs and hidden fields then submit then new page as the only way to get data to the server is gone.</p>
<p>Let&#8217;s take an editable grid as an example. I see grid and I need to change data in it. Classic approach would be: click, new page or a popup with form, submit, new page with result or reload of the grid as minimum. This was what I was looking for. Never thought that it can be that simple as to (double)click the cell I want to change the value of, change it and that&#8217;s it. And how data gets to the server? In background. Works almost like spreadsheet.</p>
<p>What job is left for the server?</p>
<p>Not too much. It has to prepare the main page but there is not much dynamics needed in that so PHP processor maybe stays idle here and a static HTML will do. Then it has to react to requests sent from client for either another static data (HTML fragments) or we wake up PHP (or other) processor to do some validation and/or database engine SQL-ing.</p>
<p><b>It is incredibly simple! Sometimes that simple that it is difficult to digest the simplicity. Should you have troubles with anything in Ext start to think &#8220;How to make it simple?&#8221; That is the right way.</b></p>
<p>A philosophical conclusion.</p>
<p>Ext doesn&#8217;t only provide an easier way to do things in browsers. It is creating the new application platform. You do not need to ask anymore if this or that application is for Linux, Mac or Windows. It&#8217;s for a browser with javascript and it doesn&#8217;t matter which operating system is installed on the computer the browser runs in.</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/philosophy/changing-viewpoing-to-ext/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

