<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>oop &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/oop/</link>
	<description>Feed of posts on WordPress.com tagged "oop"</description>
	<pubDate>Mon, 30 Nov 2009 13:26:44 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Mengenal ActionScript 3.0 [basic] part 1]]></title>
<link>http://iddev.wordpress.com/2009/11/30/mengenal-actionscript-3-0-basic-part-1/</link>
<pubDate>Mon, 30 Nov 2009 11:32:56 +0000</pubDate>
<dc:creator>iddev</dc:creator>
<guid>http://iddev.wordpress.com/2009/11/30/mengenal-actionscript-3-0-basic-part-1/</guid>
<description><![CDATA[Untuk belajar ActionScript 3, terlebih dahulu kita harus memahami konsep OOP. Saya anggap kita sekar]]></description>
<content:encoded><![CDATA[Untuk belajar ActionScript 3, terlebih dahulu kita harus memahami konsep OOP. Saya anggap kita sekar]]></content:encoded>
</item>
<item>
<title><![CDATA[Lovely]]></title>
<link>http://freyadeivy.wordpress.com/2009/11/29/lovely/</link>
<pubDate>Sun, 29 Nov 2009 10:07:14 +0000</pubDate>
<dc:creator>freyfeyivy</dc:creator>
<guid>http://freyadeivy.wordpress.com/2009/11/29/lovely/</guid>
<description><![CDATA[lovely weekend except for my french, photography, haunting, bathing and chain-smoking. and i broke a]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>lovely weekend except for my french, photography, haunting, bathing and chain-smoking.</p>
<p>and i broke a heel.</p>
<p>jimmy crickets i&#8217;ll get those photos  - <span style="color:#ffcc00;">AUTO</span> <span style="color:#00ff00;">HIGH</span> <span style="color:#00ffff;">C</span><span style="color:#ff0000;">ONTRAST</span> -    make them into a film and posty wosty them on Monday night</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to post source code on Wordpress]]></title>
<link>http://ilea.wordpress.com/2009/11/29/how-to-post-source-code-on-wordpress/</link>
<pubDate>Sun, 29 Nov 2009 00:04:17 +0000</pubDate>
<dc:creator>Razzor</dc:creator>
<guid>http://ilea.wordpress.com/2009/11/29/how-to-post-source-code-on-wordpress/</guid>
<description><![CDATA[As I said in another post, I will post predominantly IT content.These days I started to learn the Ja]]></description>
<content:encoded><![CDATA[As I said in another post, I will post predominantly IT content.These days I started to learn the Ja]]></content:encoded>
</item>
<item>
<title><![CDATA[title]]></title>
<link>http://scriptforall.wordpress.com/2009/11/26/title-33/</link>
<pubDate>Thu, 26 Nov 2009 12:07:46 +0000</pubDate>
<dc:creator>kostland</dc:creator>
<guid>http://scriptforall.wordpress.com/2009/11/26/title-33/</guid>
<description><![CDATA[Cisco and Salesforce associate their technologies of center D `call Web &#8211; Actualits &#8211; ZD]]></description>
<content:encoded><![CDATA[Cisco and Salesforce associate their technologies of center D `call Web &#8211; Actualits &#8211; ZD]]></content:encoded>
</item>
<item>
<title><![CDATA[Senior Flash developer - West London - Upto £45k]]></title>
<link>http://calvinjnr.wordpress.com/2009/11/25/senior-flash-developer-west-london-upto-45k/</link>
<pubDate>Wed, 25 Nov 2009 12:39:05 +0000</pubDate>
<dc:creator>calvinjnr</dc:creator>
<guid>http://calvinjnr.wordpress.com/2009/11/25/senior-flash-developer-west-london-upto-45k/</guid>
<description><![CDATA[Digital agency in west London is looking for a talented flash developer to join their Digital team, ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Digital agency in west London is looking for a talented flash developer to join their Digital team, you’ll produce highly creative Flash on wide range of online projects.  Your work will demonstrate a balance of creativity, usability, and development expertise.  You’ll produce clean, well structured object orientated code in AS3, and regularly work with video and audio. You’ll spend your time working closely with user experience architects, designers and developers, and project managers, and will be a key member of the team.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>Job  Responsibilities</p>
<p>• Take overall responsibility for Flash development for the agency.</p>
<p>• Produce high quality, creative, and technically robust Flash animations and applications</p>
<p>• Work on project teams alongside project managers, IAs, designers, and developers</p>
<p>• Lead and mentor junior and freelance Flash developers</p>
<p>• Constantly trial, shape and improve Flash methodologies and deliverables</p>
<p>• Keep abreast of latest Flash developments and communicate this to internal teams</p>
<p>&#160;</p>
<p>&#160;</p>
<p>Required skills</p>
<p>• You’ll have proven experience in Flash development, including animation, action-scripting, and video/audio production. Your specific Flash skills will include:</p>
<p>o  Expertise in AS3, AS2, and object orientated programming</p>
<p>o XML parsing and handling</p>
<p>o  Flash video creation compression and playback</p>
<p>o  JavaScript integration</p>
<p>o Flash accessibility</p>
<p>o Integrating 3rd party libraries and plug-ins</p>
<p>• You’ll have relevant design agency experience</p>
<p>• You’ll have a professional approach and good communication skills. Being organised, pro-active and efficient with excellent attention to detail is an essential aspect of this role.</p>
<p>• You’ll have experience of working with, and mentoring other Flash developers</p>
<p>• You’ll have experience in estimating timescales on Flash projects</p>
<p>&#160;</p>
<p>Key points:</p>
<p>1. Some kind of portfolio site, even if it&#8217;s a play area.</p>
<p>2. Recent work demonstrating an artistic eye, great technical ability &#38; design flair.</p>
<p>3. We don&#8217;t want see under-construction.</p>
<p>4. Variety of work is key.</p>
<p>5. They use flash for interaction, so a good user experience is important on your work.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>Desirable skills</p>
<p>• Experience with PureMVC and/or FlashMVC frameworks</p>
<p>• Flash and/or Air experience</p>
<p>• Experience of Papervision, or another Flash 3d framework</p>
<p>Collating CV&#8217;s  now so if your interested send yours to: neil@majorplayers.co.uk</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Object Oriented Programming]]></title>
<link>http://sourcecodejava.wordpress.com/2009/11/25/object-oriented-programming/</link>
<pubDate>Tue, 24 Nov 2009 17:26:17 +0000</pubDate>
<dc:creator>thaufan</dc:creator>
<guid>http://sourcecodejava.wordpress.com/2009/11/25/object-oriented-programming/</guid>
<description><![CDATA[Object-oriented programming (OOP) is a programming paradigm that uses &#8220;objects&#8221; to desig]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Object-oriented programming</strong> (OOP) is a programming paradigm that uses &#8220;objects&#8221; to design applications and computer programs. It utilizes several techniques from previously established paradigms, including inheritance, modularity, polymorphism, and encapsulation. Today, many popular programming languages (such as Ada, C++, Delphi, <a href="http://www.freejavaguide.com/history.html">Java</a>, Lisp,  SmallTalk, Perl, PHP, Python, Ruby, VB.Net, Visual FoxPro, and Visual Prolog) support OOP.</p>
<p>Object-oriented programming&#8217;s roots reach all the way back to the 1960s, when the nascent field of software engineering had begun to discuss the idea of a software crisis. As hardware and software became increasingly complex, how could software quality be maintained? Object-oriented programming addresses this problem by strongly emphasizing modularity in software.</p>
<p>The Simula programming language was the first to introduce the concepts underlying object-oriented programming (objects, classes, subclasses, virtual methods, coroutines, garbage collection and discrete event simulation) as a superset of Algol. Smalltalk was the first programming language to be called &#8220;object-oriented&#8221;.</p>
<p><ins></ins>Object-oriented programming may be seen as a collection of cooperating objects, as opposed to a traditional view in which a program may be seen as a list of instructions to the computer. In OOP, each object is capable of receiving messages, processing data, and sending messages to other objects. Each object can be viewed as an independent little machine with a distinct role or responsibility.<!--more--></p>
<p>Object-oriented programming came into existence because human consciousness, understanding and logic are highly object-oriented. By way of &#8220;objectifying&#8221; software modules, it is intended to promote greater flexibility and maintainability in programming, and is widely popular in large-scale software engineering. By virtue of its strong emphasis on modularity, object oriented code is intended to be simpler to develop and easier to understand later on, lending itself to more direct analysis, coding, and understanding of complex situations and procedures than less modular programming methods.</p>
<h3>Fundamental concepts<ins><ins></ins></ins>A survey of computing literature, identified a number of &#8220;quarks,&#8221; or fundamental concepts, identified in the strong majority of definitions of OOP. They are:</h3>
<p><strong>Class</strong><br />
A class defines the abstract characteristics of a thing (object), including the  thing&#8217;s characteristics (its attributes or properties) and the things it can do  (its behaviors or methods or features). For example, the class Dog would consist  of traits shared by all dogs, for example breed, fur color, and the ability to  bark. Classes provide modularity and structure in an object-oriented computer  program. A class should typically be recognizable to a non-programmer familiar  with the problem domain, meaning that the characteristics of the class should  make sense in context. Also, the code for a class should be relatively  self-contained. Collectively, the properties and methods defined by a class are called members.<br />
<strong>Object</strong><br />
A particular instance of a class. The class of Dog defines all possible dogs by  listing the characteristics that they can have; the object Lassie is one  particular dog, with particular versions of the characteristics. A Dog has fur;  Lassie has brown-and-white fur. In programmer jargon, the object Lassie is an  instance of the Dog class. The set of values of the attributes of a particular  object is called its state.<br />
<strong>Method</strong><br />
An object&#8217;s abilities. Lassie, being a Dog, has the ability to bark. So bark()  is one of Lassie&#8217;s methods. She may have other methods as well, for example  sit() or eat(). Within the program, using a method should only affect one  particular object; all Dogs can bark, but you need one particular dog to do the barking.<br />
<strong>Message passing</strong><br />
&#8220;The process by which an object sends data to another object or asks the other object to invoke a method.&#8221;</p>
<p><ins></ins><strong>Inheritance</strong><br />
In some cases, a class will have &#8220;subclasses,&#8221; more specialized versions of a class. For example, the class Dog might have sub-classes called Collie, Chihuahua, and GoldenRetriever. In this case, Lassie would be an instance of the Collie subclass. Subclasses inherit attributes and behaviors from their parent classes, and can introduce their own. Suppose the Dog class defines a method called bark() and a property called furColor. Each of its sub-classes (Collie, Chihuahua, and GoldenRetriever) will inherit these members, meaning that the programmer only needs to write the code for them once. Each subclass can alter its inherited traits. So, for example, the Collie class might specify that the default furColor for a collie is brown-and-white. The Chihuahua subclass might specify that the bark() method is high-pitched by default. Subclasses can also add new members. The Chihuahua subclass could add a method called tremble(). So an individual chihuahua instance would use a high-pitched bark() from the Chihuahua subclass, which in turn inherited the usual bark() from Dog. The chihuahua object would also have the tremble() method, but Lassie would not, because she is a Collie, not a Chihuahua. In fact, inheritance is an &#8220;is-a&#8221; relationship: Lassie is a Collie. A Collie is a Dog. Thus, Lassie inherits the members of both Collies and Dogs. When an object or class inherits its traits from more than one ancestor class, and neither of these ancestors is an ancestor of the other, then it&#8217;s called multiple inheritance.</p>
<p><strong>Encapsulation</strong><br />
Conceals the exact details of how a particular class works from objects that use  its code or send messages to it. So, for example, the Dog class has a bark()  method. The code for the bark() method defines exactly how a bark happens (e.g.,  by inhale() and then exhale(), at a particular pitch and volume). Timmy,  Lassie&#8217;s friend, however, does not need to know exactly how she barks.  Encapsulation is achieved by specifying which classes may use the members of an  object. The result is that each object exposes to any class a certain interface  — those members accessible to that class. The reason for encapsulation is to  prevent clients of an interface from depending on those parts of the  implementation that are likely to change in future, thereby allowing those  changes to be made more easily, that is, without changes to clients. For  example, an interface can ensure that puppies can only be added to an object of  the class Dog by code in that class. Members are often specified as public,  protected or private, determining whether they are available to all classes,  sub-classes or only the defining class. Some languages go further: <a href="http://www.freejavaguide.com/">Java</a> uses the protected keyword to  restrict access also to classes in the same package, and C++ allows one to specify which classes may access any member.</p>
<p><strong>Abstraction</strong><br />
Simplifying complex reality by modeling classes appropriate to the problem, and  working at the most appropriate level of inheritance for a given aspect of the  problem. For example, Lassie the Dog may be treated as a Dog much of the time, a  Collie when necessary to access Collie-specific attributes or behaviors, and as  an Animal (perhaps the parent class of Dog) when counting Timmy&#8217;s pets.</p>
<p><strong>Polymorphism</strong><br />
Polymorphism is the ability of behavior to vary based on the conditions in which  the behavior is invoked, that is, two or more methods, as well as operators  (such as +, -, *, among others) can fit to many different conditions. For  example, if a Dog is commanded to speak() this may elicit a Bark; if a Pig is  commanded to speak() this may elicit an Oink. This is expected because Pig has a  particular implementation inside the speak() method. The same happens to class  Dog. Considering both of them inherit speak() from Animal, this is an example of  Overriding Polymorphism. Another good example is about Overloading Polymorphism,  a very common one considering operators, like &#8220;+&#8221;. Once defined an operator used  to add numbers, given a class Number and also given two other classes that  inherits from Number, such as Integer and Double. Any programmer expects to add  two instances of Double or two instances of Integer in just the same way, and  more than this: Any programmer expects the same behavior to any Number. In this  case, the programmer must overload the concatenation operator, &#8220;+&#8221;, by making it  able to operate with both Double and Integer instances. The way it is done  varies a little bit from one language to another and must be studied in more  details according to the programmer interest. Most of the OOP languages support  small differences in method signatures as polymorphism. it&#8217;s very useful, once  it improves code readability, to enable implicit conversions to the correct  handling method when apply add() method to integers, like in add(1,2), or to  strings like in add(&#8220;foo&#8221;,&#8221;bar&#8221;) since the definitions of these signatures are  available. In many OOP languages, such method signatures would be, respectively,  very similar to add(int a, int b) and add(String a, String b). This is an  example of Parametric Polymorphism. The returned type and used modifiers, of  course, depend on the programmer interests and intentions.</p>
<h3>History</h3>
<p>The concept of objects and instances in computing had its first major  breakthrough with the PDP-1 system at MIT which was the earliest example of  capability based architecture. Another early example was Sketchpad made by Ivan  Sutherland in 1963; however, this was an application and not a programming  paradigm. Objects as programming entities were introduced in the 1960s in Simula  67, a programming language designed for making simulations, created by Ole-Johan  Dahl and Kristen Nygaard of the Norwegian Computing Center in Oslo. Such an  approach was a simple extrapolation of concepts earlier used in analog  programming. On analog computers, such direct mapping from real-world  phenomena/objects to analog phenomena/objects (and conversely), was (and is)  called &#8217;simulation&#8217;. Simula not only introduced the notion of classes, but also  of instances of classes, which is probably the first explicit use of those notions.</p>
<p>The Smalltalk language, which was developed in the 1970s, introduced the term  Object-oriented programming to represent the pervasive use of objects and  messages as the basis for computation. Smalltalk creators were influenced by the  ideas introduced in Simula 67, but Smalltalk was designed to be a fully dynamic  system in which classes could be created and modified dynamically rather than  simply using static ones. The ideas in Simula 67 were also used in many other languages, from derivatives of Lisp to Pascal.</p>
<p>Object-oriented programming developed as the dominant programming methodology  during the mid-1980s, largely due to the influence of C++. Its dominance was  further cemented by the rising popularity of graphical user interfaces, for  which object-oriented programming is well-suited. OOP toolkits also enhanced the  popularity of &#8220;event-driven programming&#8221;. Some feel that association with GUIs  (real or perceived) was what propelled OOP into the programming mainstream.</p>
<p>OOP also became increasingly popular for developing computer games during the  1990s. As the complexity of games grew, as faster hardware became more widely  available and compilers matured, more and more games and their engines were  written in OOP languages. Since almost all video games feature virtual  environments which contain many, often thousands of objects that interact with  each other in complex ways, OOP languages are particularly suited for game development.</p>
<p>Object-oriented features have been added to many existing languages during that time, including Ada, BASIC, Lisp, Fortran, Pascal, and others. Adding these features to languages that were not initially designed for them often led to problems with compatibility and maintainability of code.</p>
<p>In the past decade Java has emerged in wide use partially because of its  similarity to C++, but perhaps more importantly because of its implementation  using a virtual machine that is intended to run code unchanged on many different  platforms. This last feature has made it very attractive to larger development  shops with heterogeneous environments. Microsoft&#8217;s .NET initiative has a similar  objective and includes/supports several new languages, or variants of older ones.</p>
<p>Besides <a href="http://www.freejavaguide.com/history.html">Java</a>, probably the most commercially  important recent object-oriented languages are Visual Basic .NET and C# designed for Microsoft&#8217;s .NET platform.</p>
<p>Just as procedural programming led to refinements of techniques such as  structured programming, modern object-oriented software design methods include  refinements such as the use of design patterns, design by contract, and modeling languages.</p>
<p><strong>OOP in scripting</strong><br />
In recent years, object-oriented programming has become especially popular in  scripting programming languages. Python and Ruby are scripting languages built  on OOP principles, while Perl and PHP have been adding object oriented features since Perl 5 and PHP 4.</p>
<p>The Document Object Model of <a href="http://www.freejavaguide.com/html.htm">HTML</a>, XHTML, and <a href="http://www.freejavaguide.com/xml.html">XML</a> documents on the Internet have bindings to the  popular JavaScript/ECMAScript language. JavaScript is perhaps the best known  prototype-based programming language.</p>
<h3>Problems and patterns</h3>
<p>There are a number of programming challenges which a developer encounters  regularly in object-oriented design. There are also widely accepted solutions to  these problems. The best known are the design patterns codified by Gamma et al,  but in a more general sense the term &#8220;design patterns&#8221; can be used to refer to  any general, repeatable solution to a commonly occurring problem in software  design. Some of these commonly occurring problems have implications and solutions particular to object-oriented development.</p>
<p><strong>Gang of Four design patterns</strong><br />
Design Patterns: Elements Reusable Object-Oriented Software is an influential book published in 1995 by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, sometimes casually called the &#8220;Gang of Four.&#8221; Along with exploring the capabilities and pitfalls of object-oriented programming, it describes 23 common programming problems and patterns for solving them.</p>
<p><strong>Object-orientation and databases</strong><br />
Both object-oriented programming and relational database management systems (RDBMSs)  are extremely common in software today. Since relational databases don&#8217;t store  objects directly (though some RDBMSs have object-oriented features to  approximate this), there is a general need to bridge the two worlds. There are a  number of widely used solutions to this problem. One of the most common is  object-relational mapping, as found in libraries like Java Data Objects, and Ruby on Rails&#8217; ActiveRecord.</p>
<p>There are also object databases which can be used to replace RDBMSs, but these have not been as commercially successful as RDBMSs.</p>
<p><strong>Matching real world</strong><br />
OOP can be used to translate from real-world phenomena to program elements (and  vice versa). OOP was even invented for the purpose of physical modelling in the  Simula-67 programming language. However, not everyone agrees that direct  real-world mapping is facilitated by OOP, or is even a worthy goal; Bertrand  Meyer argues in Object-Oriented Software Construction that a program is not a  model of the world but a model of a model of some part of the world; &#8220;Reality is a cousin twice removed&#8221;.</p>
<p><strong>Formal definition</strong><br />
There have been several attempts at formalizing the concepts used in  object-oriented programming. The following concepts and constructs have been used as interpretations of OOP concepts:</p>
<p>coalgebraic datatypes<br />
existential quantification and modules<br />
recursion<br />
records and record extensions<br />
F-bounded polymorphism</p>
<p>Attempts to find a consensus definition or theory behind objects have not proven very successful, and often diverge widely. For example, some definitions focus on mental activities, and some on mere program structuring. One of the simpler definitions is that OOP is the act of using &#8220;map&#8221; data structures or arrays that can contain functions and pointers to other maps, all with some syntactic and scoping sugar on top. Inheritance can be performed by cloning the maps (sometimes called &#8220;prototyping&#8221;).</p>
<p><span style="font-size:xx-small;">Above article originally from wikipedia.org. Above article is available under GNU Free Documentation License.</span></p>
<p><a href="http://sourcecodejava.wordpress.com/wp-admin/tools.php"></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ Employment: justice says not to the plan of dparts voluntary dAltran ]]></title>
<link>http://scriptforall.wordpress.com/2009/11/24/employment-justice-says-not-to-the-plan-of-dparts-voluntary-daltran/</link>
<pubDate>Tue, 24 Nov 2009 14:05:47 +0000</pubDate>
<dc:creator>kostland</dc:creator>
<guid>http://scriptforall.wordpress.com/2009/11/24/employment-justice-says-not-to-the-plan-of-dparts-voluntary-daltran/</guid>
<description><![CDATA[Employment: justice says not to the plan of dparts voluntary D `Altran &#8211; Actualits &#8211; ZDN]]></description>
<content:encoded><![CDATA[Employment: justice says not to the plan of dparts voluntary D `Altran &#8211; Actualits &#8211; ZDN]]></content:encoded>
</item>
<item>
<title><![CDATA[Using null object pattern with Doctrine]]></title>
<link>http://bleroutoolkit.wordpress.com/2009/11/24/using-null-object-pattern-with-doctrine/</link>
<pubDate>Tue, 24 Nov 2009 13:27:08 +0000</pubDate>
<dc:creator>Szabolcs Sulik</dc:creator>
<guid>http://bleroutoolkit.wordpress.com/2009/11/24/using-null-object-pattern-with-doctrine/</guid>
<description><![CDATA[A lot of resource out there about null object pattern. Fundamentally this is a design pattern that d]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A <a href="http://www.cookiepattern.com/2008/07/null-object-pattern.html">lot of resource</a> <a href="http://martinfowler.com/eaaCatalog/specialCase.html">out there</a> about <a href="http://en.wikipedia.org/wiki/Null_Object_pattern">null object pattern</a>. Fundamentally this is a design pattern that describes an object what behave like a null value, but it can be handled as a regular object in the given context.</p>
<p>Let&#8217;s see the benefit of this pattern with <a href="http://www.doctrine-project.org/">Doctrine</a>.</p>
<p><!--more--></p>
<p>Suppose we have a gallery with images. Every gallery have a &#8220;preview&#8221; image (one from the its images), which represents the gallery in lists (or anywhere else). How can we handle the situation when a gallery has no preview image? (We want to show a &#8220;no-image.jpg&#8221; there.)</p>
<p>Let&#8217;s start with the schema:</p>
<pre>Gallery:
  tableName: gallery
  columns:
    id:
      type: integer
      unsigned: true
      notnull: true
      primary: true
      autoincrement: true
    name:
      type: string(200)
    preview_image_id:
      type: integer
      unsigned: true
      notnull: true
  relations:
    PreviewImage:
      local: preview_image_id
      foreign: id
      type: one
      class: Image
Image:
  tableName: image
  columns:
    id:
      type: integer
      unsigned: true
      notnull: true
      primary: true
      autoincrement: true
    gallery_id:
      type: integer
      unsigned: true
      notnull: true
    file:
      type: string(255)
    title:
      type: string(255)
  relations:
    Gallery:
      local: gallery_id
      foreign: id
      foreignAlias: Images
      onDelete: CASCADE
</pre>
<p>We have a working database schema, where gallery has a foreign key (preview_image_id) to its preview image. The set up of this field is up to the developers. What will happen when we want to show the preview image at this state of model?</p>
<p>First, we add some code to Image model class, to simplify the image handling.</p>
<pre>class Image extends BaseImage
{
  const TYPE_ORIGINAL = 1;
  const TYPE_THUMBNAIL = 2;

  // ...
  public function getImageName($type = self::TYPE_ORIGINAL)
  {
    $info = pathinfo($this-&#62;file);
    $names = array(
      self::TYPE_ORIGINAL =&#62; $this-&#62;file,
      self::TYPE_THUMBNAIL =&#62; $info['filename'].'_thumb.'.$info['extension'],
    );

    if (!isset($names[$type]))
    {
      throw new InvalidArgumentException();
    }

    return $names[$type];
  }

  public function getImagePath($absolute = true)
  {
    $path = '/uploads/images';
    $absolute_path = sfConfig::get('sf_web_dir').$path;

    if (!file_exists($absolute_path))
    {
      mkdir($absolute_path, 0777, true);
      chmod($absolute_path, 0777);
    }

    return $absolute ? $absolute_path : $path;
  }

  public function getImageFile($type = self::TYPE_ORIGINAL, $absolute = false)
  {
    return $this-&#62;getImagePath($absolute).'/'.$this-&#62;getImageFile($type);
  }
  // ...
}
</pre>
<p>So what will happen when we want to show the preview image?</p>
<pre>&#60;img src="&#60;?= $gallery-&#62;PreviewImage-&#62;getImageFile(); ?&#62;" /&#62;
</pre>
<p>It depends on. If we have a setted up preview image, it works well. If not, we have a fatal error. So with this model, we always have to check the foreign field (preview_image_id), it&#8217;s a null value or an object. It would be convenient we just <em>use</em> that object ($gallery-&#62;PreviewImage), and the object can handle the special case (the null object). </p>
<p>We have to do two things for that:</p>
<ol>
<li>set up Doctrine to give a &#8220;fresh&#8221; Image object, when we call $gallery-&#62;PreviewImage (this will be the null object)</li>
<li>have to handle the case when file field is empty</li>
</ol>
<p>The first constraint can be done easily. Just remove the notnull instruction from the preview_image_id field of Gallery model. With this setup the Doctrine will return a new Image instacne.</p>
<p>The second constraint can be done by small modification of our model code: </p>
<pre>class Image extends BaseImage
{
  // ...
  public function getImageName($type = self::TYPE_ORIGINAL)
  {
    if ($this-&#62;file)
    {
      $info = pathinfo($this-&#62;file);
      $names = array(
        self::TYPE_ORIGINAL =&#62; $this-&#62;file,
        self::TYPE_THUMBNAIL =&#62; $info['filename'].'_thumb.'.$info['extension'],
      );
    }
    else
    {
      $names = array(
        self::TYPE_ORIGINAL =&#62; '/images/no_image.jpg',
        self::TYPE_THUMBNAIL =&#62; '/images/no_image_thumb.jpg',
      );
    }

    if (!isset($names[$type]))
    {
      throw new InvalidArgumentException();
    }

    return $names[$type];
  }

  public function getImageFile($type = self::TYPE_ORIGINAL, $absolute = false)
  {
    if (!$this-&#62;file)
    {
      return $this-&#62;getImageName($type);
    }
    return $this-&#62;getImagePath($absolute).'/'.$this-&#62;getImageFile($type);
  }
  // ...
}
</pre>
<p>That&#8217;s it.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Fudge butter]]></title>
<link>http://freyadeivy.wordpress.com/2009/11/21/fudge-butter/</link>
<pubDate>Sat, 21 Nov 2009 11:19:42 +0000</pubDate>
<dc:creator>freyfeyivy</dc:creator>
<guid>http://freyadeivy.wordpress.com/2009/11/21/fudge-butter/</guid>
<description><![CDATA[]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://freyadeivy.wordpress.com/files/2009/11/zfbsgsgd.png"><img class="alignnone size-full wp-image-72" title="c" src="http://freyadeivy.wordpress.com/files/2009/11/zfbsgsgd.png" alt="" width="600" height="215" /></a><a href="http://freyadeivy.wordpress.com/files/2009/11/zfbsgsgd.png"></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ Google Street View: Google seeks places inexplors for its tricycle ]]></title>
<link>http://softwarestechnologies.wordpress.com/2009/11/21/google-street-view-google-seeks-places-inexplors-for-its-tricycle/</link>
<pubDate>Sat, 21 Nov 2009 10:33:54 +0000</pubDate>
<dc:creator>garaffi</dc:creator>
<guid>http://softwarestechnologies.wordpress.com/2009/11/21/google-street-view-google-seeks-places-inexplors-for-its-tricycle/</guid>
<description><![CDATA[Google Street View: Google seeks places inexplors for its tricycle &#8211; Actualits &#8211; ZDNet. ]]></description>
<content:encoded><![CDATA[Google Street View: Google seeks places inexplors for its tricycle &#8211; Actualits &#8211; ZDNet. ]]></content:encoded>
</item>
<item>
<title><![CDATA[Object Oriented Programming bikin pusing?]]></title>
<link>http://javaiqs.wordpress.com/2009/11/21/java-object-oriented-programming/</link>
<pubDate>Sat, 21 Nov 2009 02:58:42 +0000</pubDate>
<dc:creator>javaiqs</dc:creator>
<guid>http://javaiqs.wordpress.com/2009/11/21/java-object-oriented-programming/</guid>
<description><![CDATA[Pusing memahami OOP? ya gitu deh&#8230; saya juga mengalami hal tersebut, mungkin saya agak terlamba]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Pusing memahami OOP? ya gitu deh&#8230; saya juga mengalami hal tersebut, mungkin saya agak terlambat mempelajari OOP maklum terlalu asik belajar VB yang ga jelas OOP-nya. Setiap saya mempelajari teknik  OOP di java saya selalu membandingkannya dengan Visual Basic 6.0, walhasil saya selalu bingung untuk memulainya.</p>
<p>Untuk para programmer VB yang  mau mencoba pindah ke JAVA, saya berharap jangan putus asa terus berjuang biar bisa buat program yang full OOP.</p>
<p>Pada paragraf ke-dua mungkin saya terlalu berlebihan, tapi terus terang ketika pertama kali mempelajari VB peningkatan skill yang saya alami lebih cepat (ketimbang ketika mempelajari JAVA) mulai dari nol sampai dapat membuat games, program database. harapan saya melalui blog ini dapat membantu rekan-rekan yang mengalami kesulitan dalam mempelajari OOP dengan menggunaka bahasa pemrograman JAVA.</p>
<p>Regards,</p>
<p>Istiqomah Sumadikarta</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Exploring constructors in Javascript]]></title>
<link>http://blog.athambia.org/2009/11/20/exploring-constructors-in-javascript/</link>
<pubDate>Fri, 20 Nov 2009 08:38:23 +0000</pubDate>
<dc:creator>ziggurism</dc:creator>
<guid>http://blog.athambia.org/2009/11/20/exploring-constructors-in-javascript/</guid>
<description><![CDATA[I came upon this Javascript tutorial by jQuery inventor John Resig (nod to John Gruber). It covered ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I came upon this <a href="http://ejohn.org/apps/learn/"> Javascript tutorial</a> by <a href="http://jquery.com/">jQuery</a> inventor <a href="http://ejohn.org/">John Resig</a> (nod to <a href="http://daringfireball.net/linked/2009/11/16/resig-js">John Gruber</a>).  It covered several advanced Javascript topics with the goal of explaining to the reader the meaning of a particularly esoteric bind method from <a href="http://www.prototypejs.org/">prototype.js</a>.  It was fun, and I followed most of it pretty well, although I got a little lost by the end in the section about <a href="http://ejohn.org/apps/learn/#82">Enforcing Function Context</a>.</p>
<p>The tutorial included a lesson on pages <a href="http://ejohn.org/apps/learn/#35">35</a>–<a href="http://ejohn.org/apps/learn/#38">38</a> about Javascript constructors which interested me.</p>
<p>First a recap of basic Javascript OOP.  In Javascript, <a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">objects</a> are defined via <a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">functions</a>.  To construct an instance of this function, you use the <a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Operators/Special_Operators/new_Operator">new operator</a>, like so: <code><br />
function foo(x,y) {this.x = x; this.y = y; }<br />
var instanceOfFoo = new foo(1,2);<br />
</code></p>
<p>Whereas if you want to use a function as a function, you simply call it, like so:<br />
<code><br />
function bar(x,y) {return x + y; }<br />
var valueOfBar = bar(1,2);  //this is the standard function call<br />
valueOfBar = bar.call(this,1,2); //this is a more reflective call<br />
valueOfBar = bar.apply(this,[1,2]); //this is even more reflective<br />
</code></p>
<p>So <code>new functionName()</code> to construct an instance of <code>functionName</code>, the OOP object constructor usage of a Javascript function.  And just <code>functionName()</code> to to call the function and gets its return value, the functional usage of a Javascript function.  Note that if a function is to be used in the functional manner, it must include a <code>return</code> statement; otherwise the value of the function all will be undefined.</p>
<p>The two uses of a Javascript function have different syntax and different semantics.  And if you use one where you&#8217;re supposed to use the other, your code can fail in unexpected ways.  In particular, if you accidentally leave of the keyword <code>new</code>, you won&#8217;t get an object, instead you&#8217;ll get the return value of the function, or else undefined if there is no return statement.</p>
<p>In addition to the standard Javascript function call, I listed two additional ways to execute a function call which could be said to be more <a href="http://en.wikipedia.org/wiki/Reflection_(computer_science)">reflective</a>, ie instead of requiring you to write the identifier for the function statically in the source code, it may be determined dynamically at runtime.  The first of the two reflective function calls is the <a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/call"><code>Function.call</code></a> method, which requires you to list the parameters explicitly.  The second is the <a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function/apply"><code>Function.apply</code></a> method.  The second is the more reflective of the two, because it takes an array containing all the arguments, which can be constructed at runtime, rather than requiring they be listed explicitly in the time.</p>
<p>Of note for this blog post is that there isn&#8217;t a builtin method like <code>Function.apply</code> which works when using the function as an object constructor.  There&#8217;s some syntactical incompatibility between the function call and the object constructor which precludes from saying something like <code>new foo.apply(array)</code>.</p>
<p>End elementary Javascript recap.</p>
<p>So in the Javascript tutorial, Resig demonstrates some code which ensures that even if you accidentally leave off the <code>new</code> keyword when constructing an object:<br />
<code><br />
function User(first, last){<br />
<span style="color:#ff0000;"><br />
  if ( !(this instanceof User) )<br />
    return new User(first, last);<br />
</span><br />
  this.name = first + " " + last;<br />
}<br />
</code><br />
The addition of the two lines of code in red give us the functionality to preclude calling this function as a function instead of an object constructor.  So if the context in the function is an instance of the calling function itself, then the function was called correctly as constructing an instance of the object.  Otherwise, it re-calls the function correctly with the <code>new</code> keyword.  Pretty straightforward.</p>
<p>But this code is too static.  First we have to reference the particular function we&#8217;re in.  Then we reference it again, as well as the argument list.  If you wanted to rely on this functionality, you&#8217;d have to include these two lines in every object constructor in your code, and you&#8217;d have to modify the lines for the particular function name and argument list.  A massive violation of the principle of <a href="http://en.wikipedia.org/wiki/DRY">DRY</a>.</p>
<p>So then Resig changes the first of the two lines to remove the reference to the function:<br />
<code><br />
  if ( !(this instanceof arguments.callee) )<br />
    return new User(first, last);<br />
</code><br />
<code>arguments</code> is an array-like object available within the scope of every function.  (To make an honest array out of <code>arguments</code>, use <code>Array.prototype.slice.call(arguments)</code>).  It contains a list of all the arguments passed to the function (<code>arguments[i]</code> is the </code>i</code>th argument passed to the function), as well as a reference to the function that was called (<code>arguments.callee</code>).  We compare the function to the context of the function.  The context is available in the function via the <code>this</code> object.  If you call the function as an object constructor, then <code>this</code> stores the object instance being constructed, and that object is an instance of function which was called.  This <code>this instanceof arguments.callee</code> is <code>true</code>.  On the other hand, if you call the function as a standard function call, then <code>this</code> is the global context, usually the browser window where the code is executing, which is, needless to say, not an instance of the function called.  So <code>this instanceof arguments.callee</code> is <code>false</code>.</p>
<p>So in the first of the two lines of code, we've successfully removed the reference to the particular function by replacing it with <code>arguments.callee</code>.  But it's still present in the second line.  We haven't really solved the problem at all.  This is where Resig leaves the issue, but I wondered if we could do better.  It turns out that we can also replace the reference to the function in the second line:<br />
<code><br />
  if ( !(this instanceof arguments.callee) )<br />
    return new arguments.callee(first, last);<br />
</code><br />
This is a little better, we've removed all explicit references to the function.  However, we still don't have complete generality, because in line two, we still have to list explicitly the arguments to the function, so the code can't be reused without modification.  But since we have at our disposal an array containing all the arguments, I thought we should be able to accomplish it.  Just like <code>Function.apply</code> allows you to make a function call with arguments taken from the contents of an array, we need something analogous for object instantiation.  Something like <code>new foo.apply(this,arguments)</code>.</p>
<p>Unfortunately, the obvious guess doesn't work, and after fucking around with different options for a while, I couldn't come up with anything that did.  So I turned to The Google, which as always, had the answer.  Someone poses the exact problem I'm investigating on stackoverflow, and <a href="http://silentmatt.com/">Matthew Crumley</a> <a href="http://stackoverflow.com/questions/1606797/use-of-apply-with-new-operator-is-this-possible/1608546#1608546">posts a solution</a>:<br />
<code><br />
function construct(constructor, args) {<br />
	function F() {<br />
		return constructor.apply(this, args);<br />
	}<br />
	F.prototype = constructor.prototype;<br />
	return new F();<br />
}</p>
<p>function User(first, last)<br />
{<br />
	if ( !(this instanceof arguments.callee) )<br />
		return new construct(arguments.callee,Array.prototype.slice.call(arguments));<br />
	this.name = first + " " + last;<br />
}<br />
</code></p>
<p>I've tested this out and it does the job.  I imagine perhaps adding it to the <code>Function</code> prototype, so that every function can optionally call it to ensure that it's only used as an object constructor.  I do have to say though, I haven't been able to completely understand how the <code>construct</code> function works.   It seems to rely on knowing how Javascript internally turns a function into an object, or some other magic that is eluding me.</p>
<p>It's mostly a moot discussion for me.  I don't think I would make use of this function.  Although I feel like Javascript ought to have an <code>apply</code> method for constructors, or better yet the constructor syntax should be more natural, somehow so that the two uses of the Javascript function are not distinct.  But whatever, this is the way Javascript works, and I feel like we should learn it, rather than forcing it to change, rather than correcting it.  So I don't see using this method.  But it is instructive as a purely academic exercise to learn how it works and think about how it can be extended.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Las siete vidas del gato: NeXTSTEP, OPENSTEP y como mezclar muchas mayúsculas y minúsculas]]></title>
<link>http://chilenomac.wordpress.com/2009/11/20/las-siete-vidas-del-gato-nextstep-openstep-y-como-mezclar-muchas-mayusculas-y-minusculas/</link>
<pubDate>Fri, 20 Nov 2009 07:00:04 +0000</pubDate>
<dc:creator>varodonaire</dc:creator>
<guid>http://chilenomac.wordpress.com/2009/11/20/las-siete-vidas-del-gato-nextstep-openstep-y-como-mezclar-muchas-mayusculas-y-minusculas/</guid>
<description><![CDATA[Mac OS X es un hijo de padres muy distintos: NeXTSTEP y Mac OS. Aunque lleva menos de diez años con ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Mac OS X es un hijo de padres muy distintos: NeXTSTEP y Mac OS. Aunque lleva menos de diez años con nosotros, en realidad su gestación ha sido bastante larga. Esta es una continuación del artículo que puedes encontrar <a href="http://chilenomac.wordpress.com/2009/11/13/las-siete-vidas-del-gato-la-prehistoria-de-os-x-ii/">aquí</a>.<a href="http://chilenomac.wordpress.com/files/2009/11/300px-next_logo_svg.png"><img class="alignleft size-thumbnail wp-image-2260" title="next" src="http://chilenomac.wordpress.com/files/2009/11/300px-next_logo_svg.png?w=150" alt="" width="150" height="150" /></a></p>
<p style="text-align:justify;">Como veíamos en la entrada anterior, la elección de la base para el nuevo Mac OS era NeXTSTEP. ¿Pero qué significaba esto? ¿De dónde salía? ¿Qué implicaba eso para la comunidad de usuarios de Macintosh?</p>
<p><!--moreContinua leyendo para conocer las respuestas a estas preguntas--></p>
<h2 style="text-align:justify;">El origen de NeXTSTEP</h2>
<p style="text-align:justify;">Cuando Steve Jobs salió, más bien <strong>poco dignamente</strong>, de Apple, decidió que crearía una nueva compañía de computación, inspirado por conversaciones con el ganador del Nobel de química, Paul Berg, acerca de la necesidad de un workstation barato, suficientemente potente para realizar <strong>simulaciones científica</strong><strong>s</strong> en él, de modo que los estudiantes aprendieran ahí en vez de en costosos experimentos. Recordemos que en la época, la división entre computador personal y workstation era muy clara: un computador personal era un equipo con escaso poder, apenas suficiente para mover una aplicación, mientras que los workstation eran equipos muy potentes (para la época). Lo que Jobs se dedicó a crear era, entonces, una especie de intermedio a un precio razonable (lo que no consiguió, era bastante cara para un estudiante universitario).</p>
<p style="text-align:justify;">Y, por supuesto, esta máquina debía tener un sistema operativo. Los ingenieros de NeXT crearon un sistema operativo basado en el núcleo <strong>Mach</strong> y en Unix <strong>BSD</strong>. Sin embargo, lo importante es que las capas del sistema destinadas a aplicaciones con interfaz gráfica estaban completamente <strong>orientadas a objetos</strong>.</p>
<p style="text-align:justify;">¿Y qué es eso? La programación orientada a objetos es un tipo de programación, que en los años en que se fundó NeXT estaba empezando a aumentar en popularidad (dentro de lo que puede ser popular un paradigma de programación). Se trata de construir los programas a través de <strong>pequeños fragmentos</strong>, llamados objetos, lo que permite una mayor rapidez y fiabilidad al momento de crear las aplicaciones. Además, las interfaces gráficas de usuario se prestaban notablemente para esta forma de programar.</p>
<p style="text-align:justify;">Y efectivamente, en NeXTSTEP este concepto estaba <strong>completamente entretejido</strong> en el sistema. Esto permitía crear aplicaciones de gran calidad y en un tiempo relativamente rápido. Por lo demás el sistema traía (y trae… pero eso más adelante) utilidades que facilitaban enormemente el desarrollo de aplicaciones, aprovechando algunas características un tanto especiales del lenguaje que usaban los programadores, Objective C.</p>
<p style="text-align:justify;">Estos motivos, principalmente, hacían de NeXTSTEP un sistema bastante <strong>avanzado para la época.</strong> Mientras tanto, el negocio de computadores NeXT jamás despegó, salvo en ciertos nichos, como algunos bancos. Esto llevó a una redefinición de la compañía: ya no vendería hardware, concentrándose en producir el sistema operativo.</p>
<p style="text-align:justify;">Un detalle importante es que el sistema era originalmente para procesadores Motorola, pero con esa reestructuración, fue necesario convertirlo en multiplataforma. Así, pronto tuvo versiones para SPARC, PA-RISC y, notablemente, procesadores Intel.</p>
<h2 style="text-align:justify;">¿NeXT, OPEN, Open?</h2>
<p style="text-align:justify;">Así, el sistema fue evolucionando, desde la versión 0.8 en 1988 hasta la última, 3.3, en 1995. Pese a sus características, ninguna empresa estuvo mayormente interesada en el sistema. Finalmente, en 1993, fruto de una colaboración entre NeXT y Sun, saldría <strong>OpenStep</strong>. Esto era un API, es decir, una definición de las capas orientadas a objetos de <strong>NeXTSTEP</strong> que podía ser usada sobre distintos sistemas operativos (Unix, Solaris, e incluso Windows). La implementación de NeXT fue llamada <strong>OPENSTEP</strong> (siempre añadiendo confusión con las mayúsculas), lo que en la práctica era NeXTSTEP 4.0.</p>
<p style="text-align:justify;">Sin embargo, pese a ser posible usar OpenStep (sin tanta mayúscula) en casi cualquier sistema operativo, en la práctica ello no ocurrió. Ni siquiera Sun, que había creado junto con NeXT la API la usaba. Es en este estado de cosas cuando ocurre la compra de NeXT por parte de Apple. Lo que haría Apple con OPENSTEP (¿o era OpenStep? ¿o NeXTSTEP? ¿o NextStep?) lo veremos en el próximo capítulo.</p>
<h2 style="text-align:justify;">A modo de colofón</h2>
<p style="text-align:justify;">Ciertamente, podría decir muchas más cosas de NeXTSTEP. Aunque fue usado por muy poca gente, ciertamente tuvo un impacto que no estaba en proporción a la cantidad de usuarios. Por ejemplo, el concepto de <strong>World Wide Web</strong> y el primer navegador fueron creados por Sir Tim Berners-Lee en 1990 usando un computador NeXT. También otros programas, como Doom o FreeHand, fueron desarrollados principalmente en él.</p>
<p style="text-align:justify;">Además, la interfaz de usuario era bastante avanzada. Antes que escribir sobre ella, prefiero dejar algunas capturas.</p>
<p style="text-align:justify;"><a href="http://chilenomac.wordpress.com/files/2009/11/nextstep2.jpg"><img class="aligncenter size-medium wp-image-2254" title="nextstep2" src="http://chilenomac.wordpress.com/files/2009/11/nextstep2.jpg?w=300" alt="" width="300" height="236" /></a></p>
<p style="text-align:justify;">Reiniciando NeXTSTEP. La ruedita que sale en la esquina de la pantalla es el ancestro de la <strong>pelota de playa</strong> de Mac OS X.</p>
<p style="text-align:justify;"><a href="http://chilenomac.wordpress.com/files/2009/11/nextmaildesktop.jpg"><img class="aligncenter size-medium wp-image-2253" title="NeXTMailDesktop" src="http://chilenomac.wordpress.com/files/2009/11/nextmaildesktop.jpg?w=300" alt="" width="300" height="223" /></a></p>
<p style="text-align:justify;"><a href="http://chilenomac.wordpress.com/files/2009/11/nextmaildesktop.jpg"></a>En esta captura podemos ver <strong>Mail</strong> (sí, es de hecho el antecesor del programa que están pensando), con una de sus características más curiosas, lip service, que permitía insertar como adjunto grabaciones de voz hechas directamente en mail. También podemos ver el <strong>dock</strong>, en el borde derecho.</p>
<p style="text-align:justify;"><a href="http://chilenomac.wordpress.com/files/2009/11/mail.gif"><img class="aligncenter size-medium wp-image-2255" title="Mail" src="http://chilenomac.wordpress.com/files/2009/11/mail.gif?w=300" alt="" width="300" height="250" /></a></p>
<p style="text-align:justify;">En esta imagen, además de la misma aplicación Mail (pero en otra versión), podemos ver cosas como el <strong>panel de tipografías</strong>, que guarda una semejanza sospechosa a otro panel de tipografías bien conocido…</p>
<p style="text-align:justify;"><a href="http://chilenomac.wordpress.com/files/2009/11/captura-de-pantalla-2009-11-20-a-las-1-29-00.png"><img class="aligncenter size-medium wp-image-2256" title="Tipografías - OS X" src="http://chilenomac.wordpress.com/files/2009/11/captura-de-pantalla-2009-11-20-a-las-1-29-00.png?w=300" alt="" width="300" height="222" /></a></p>
<p style="text-align:justify;">Hablando de eso, quedan varias &#8220;reliquias&#8221; de NeXTSTEP en OS X. Por ejemplo, el <strong>ícono de cámara</strong> que aparece al sacar un screenshot de una ventana. Hay otras más, que veremos más adelante, cuando describamos en profundidad los componentes de OS X.</p>
<p style="text-align:justify;">Finalmente, un screenshot de NeXTSTEP 4.0, proyecto que no alcanzó a ver la luz (muero de sueño, permítanme la cursilería)</p>
<p style="text-align:justify;"><a href="http://chilenomac.wordpress.com/files/2009/11/ns40.jpg"><img class="aligncenter size-medium wp-image-2258" title="ns40" src="http://chilenomac.wordpress.com/files/2009/11/ns40.jpg?w=300" alt="" width="300" height="222" /></a></p>
<p style="text-align:justify;">
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Crearea plugin-urilor jQuery (partea 1)]]></title>
<link>http://igeeku.wordpress.com/2009/11/19/crearea-plugin-urilor-jquery-partea-1/</link>
<pubDate>Thu, 19 Nov 2009 13:55:44 +0000</pubDate>
<dc:creator>igeeku</dc:creator>
<guid>http://igeeku.wordpress.com/2009/11/19/crearea-plugin-urilor-jquery-partea-1/</guid>
<description><![CDATA[Scurtă introducere Dacă te întrebi la ce or fi bune plugin-urile astea jQuery, îți voi spune eu: îți]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><iframe src='http://digg.com/api/diggthis.php?u=http%3A%2F%2Fdigg.com%2Fprogramming%2FCrearea_plugin_urilor_jQuery_partea_1' height='82' width='55' frameborder='0' scrolling='no' style='float: right; margin-left: 10px; margin-bottom: 5px; padding: 4px 0 2px 4px; background: #fff;'></iframe></p>
<h4>Scurtă introducere</h4>
<p>Dacă te întrebi la ce or fi bune plugin-urile astea jQuery, îți voi spune eu: îți permite extinderea întregii librării jQuery prin adăugarea de noi metode și funcții la aceasta. De exemplu, ai putea crea un plugin care, printr-un singur apel, va parcurge toate link-urile unei pagini, și la fiecare link către un fișier PDF va adăuga o iconiță descriptivă. Apelul va arăta ceva în genul:
</p>
<pre class="brush: jscript;">
$("a").adaugaIconitaPDF();
</pre>
<p>Idei pentru plugin-uri sunt multe, prea multe chiar, și ca să te convingi poți intra pe <a href="http://plugins.jquery.com/" target="_blank">pagina de plugin-uri jQuery</a> unde le vei găsi ordonate după categorie. La momentul actual, acolo sunt <strong>3684</strong> de plugin-uri! Deci idei sunt cu tonele, și tot apar plugin-uri zi de zi. Așa că, ori poți sta să cauți plugin-ul care-ți trebuie, ori poți învăța să creezi propriile plugin-uri, lucru despre care voi discuta în următoarele câteva articole.
</p>
<h4>Să intrăm în pâine!</h4>
<p>Pentru început, e nevoie de puțină teorie interesantă. În caz că nu știai deja, jQuery e renumit pentru faptul că poate fi folosit cu ajutorul unui singur caracter: <strong>simbolul dolar ($)</strong>. De puține ori, însă, vei da peste probleme folosind simbolul $, fiindcă nu este singurul framework care face uz de acest simbol. Așa că, pentru a evita conflicte, când este cazul, se poate folosi cuvântul &#8220;<strong>jQuery</strong>&#8220;. De exemplu:
</p>
<pre class="brush: jscript;">
jQuery("a").fadeIn();
jQuery.variabila = 2;
</pre>
<p>Acum să îți spun și care sunt acele puține cazuri când pot apărea conflicte cu simbolul $: când creezi plugin-uri, și când folosești încă un framework împreună cu jQuery, de exemplu ExtJS + jQuery. Știind acum aceste lucruri, să începem cu plugin-urile! Pentru a putea crea plugin-uri, e nevoie să știi jQuery, evident, și care sunt obiectele extensibile din jQuery:
</p>
<ol>
<li><strong>jQuery</strong>
<ul>
<li>se ocupă cu procesarea internă</li>
<li>extinde <u>metode</u> (în alte limbaje de programare sunt cunoscute ca <em>metode statice</em>, sau <em>metode de clasă</em>)</li>
</ul>
</li>
<li><strong>jQuery.fn</strong>
<ul>
<li>se ocupă de elemente HTML și interacțiunile dintre ele</li>
<li>extinde <u>funcții</u> (în alte limbaje de programare sunt cunoscute ca <em>metode de instanță</em>)</li>
</ul>
</li>
</ol>
<p>Ca să fiu sigur că nu mă vei pierde, îți voi explica ce reprezintă metodele și funcțiile. Dacă ai deja experiență în programarea orientată pe obiecte, poți sări peste paragraful acesta. Deci, metodele pot fi apelate direct, fără a instanția o clasă. Funcțiile, pe de altă parte, pot fi apelate doar asupra unui obiect ce reprezintă o instanță a unei clase. Dacă nu știi nici ce reprezintă instanțierea, e cazul să te oprești aici și să iei un tutorial de POO în C++ sau orice alt limbaj vrei.
</p>
<p>Știind acum ce obiecte jQuery pot fi extinse, voi crea un simplu plugin care afișează un mesaj la încărcarea unor elemente HTML. Apelul va fi simplu:
</p>
<pre class="brush: jscript;">
$.mesaj("mesaj la comanda");     //metodă
$("div").mesaj("m-am incarcat"); //funcție
</pre>
<p>Și acum iată codul, trivial de altfel:</p>
<pre class="brush: jscript;">
//codul pentru metodă
jQuery.mesaj = function(msg) {
   alert(msg);
};

//codul pentru funcție
jQuery.fn.mesaj = function(msg) {
   alert(msg);
}
</pre>
<p>Ți se pare complicat ? Dacă da, e grav, fiindcă în următoarele articole se mai complică, fiindcă voi discuta despre:</p>
<ul>
<li>variabile locale și globale</li>
<li>ascunderea variabilelor</li>
<li>orientarea pe obiecte</li>
<li>setările plugin-urilor</li>
<li>funcții cu opțiuni și parametri</li>
<li>template-urile cele mai utilizate pentru plugin-uri</li>
<li>și în final, o listă de guidelines, adică un mic ghid</li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ Generali places its Java applications under monitoring ]]></title>
<link>http://scriptforall.wordpress.com/2009/11/19/generali-places-its-java-applications-under-monitoring/</link>
<pubDate>Thu, 19 Nov 2009 13:06:16 +0000</pubDate>
<dc:creator>kostland</dc:creator>
<guid>http://scriptforall.wordpress.com/2009/11/19/generali-places-its-java-applications-under-monitoring/</guid>
<description><![CDATA[tude of case &#8211; to ensure the supervision and the qualit of service D `a systme D `information ]]></description>
<content:encoded><![CDATA[tude of case &#8211; to ensure the supervision and the qualit of service D `a systme D `information ]]></content:encoded>
</item>
<item>
<title><![CDATA[The Allure of a New Orthodoxy: Will "Collapse" Collapse?]]></title>
<link>http://kvond.wordpress.com/2009/11/18/the-allure-of-a-new-orthodoxy-will-collapse-collapse/</link>
<pubDate>Wed, 18 Nov 2009 23:03:05 +0000</pubDate>
<dc:creator>kvond</dc:creator>
<guid>http://kvond.wordpress.com/2009/11/18/the-allure-of-a-new-orthodoxy-will-collapse-collapse/</guid>
<description><![CDATA[Tim Matts over at his beautiful ecocritical, ecophilosophy blog, Violent Signs, has some updates on ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="alignnone" src="http://i180.photobucket.com/albums/x247/soundandfuryandpeace/Hydra-1.jpg" alt="" width="500" height="333" /></p>
<p>Tim Matts over at his beautiful ecocritical, ecophilosophy blog, <strong><a href="http://violentsigns.wordpress.com/">Violent Signs</a></strong>, <a href="http://violentsigns.wordpress.com/2009/11/17/collapse-vi-geophilosophy-2/"><strong>has some updates</strong></a> on the RealPolitik involved in the positioning of SRism, Harmanism and the various splintering pieces of the imagined movement. He focuses on the disseminating instrument - the  &#8221;Collapse&#8221; journal - and the coming and anticipated for eco-criticialists, Geo/Philosophy issue Collapse VI. It seems that in the editorial offices there is some worry that the journal will be swallowed up by this emerging Leviathan, ever mutating in its countless discoorinated hydra-heads. Can Collapse stand apart from this growing tide of commercialized thought, can it negotiate the path between meme-like viral fields condensing the aether into impromptu orthodoxy, and the possible failure to hook onto the Next Great Thing?:</p>
<blockquote><p><em>Having recently spoken with editor Robin Mackay about the new volume, I can confirm that it is still in preparation, but an announcement will be made soon and advance orders will be possible at that time. Arriving some time in December, “late contributors and general perfectionism have held up publication…” Perhaps more interestingly, Mackay expressed concern over the journal’s affiliation with the latest philosophical trend, stating that “it’s not really centred on ‘SR/OOO’, indeed I’d be happy to distance Collapse from this apparent new orthodoxy!”</em></p></blockquote>
<p>It seems that Tim jumped the gun in letting this &#8220;distancing&#8221; move of the journal out of the bag, and in doing so crossed the no-email-without-permission line that we find to be sacred. Tim felt that this was in good spirits and constructive, an interesting ethical topic in its own right, perhaps to be revisited. Its good to also post the &#8220;urbanomic&#8221; response, which does not refuse that such a distancing move is necessary, but that it needs to be clarified:</p>
<blockquote><p><em>Hi Tim, to clarify – since you’re publicly quoting me from a hurried email response! – it’s not a matter of distancing Collapse from SR/OOO specifically – Rather, from the start the aim of Collapse was to avoid being associated with any philosophical ’school’, and to defy the tendency of philosophers to become jealous partisans of some particular camp or other and to spend their time defining and defending it; both by publishing important philosophical work that doesn’t fit into recognised academic categories – this was the reason for publishing Meillassoux et al in the first place – and by integrating work from outside philosophy.</em></p>
<p><em>Although this has always explicitly been its agenda, Collapse has inevitably been characterised in various places as being the ‘official journal of SR’ and suchlike, and even criticised for wavering from ‘real SR’. Whilst I’m more than happy with the association and with playing a part in disseminating that work, I don’t want readers to expect each volume to be some sort of ‘SR update’ and then to be disappointed. That’s why I mentioned it to you, since you were talking about reviewing the new volume as part of an overview of SR/OOO: Collapse played its part, but blogs and other publications will provide a much better overview of the current state of these developments.</em></p>
<p><em>I do think that we shouldn’t lose what’s important – the specificity and heterogeneity of each thinker’s work – in the excitement of a ‘next big thing’ and in the drive to determine affiliations and mark out territories.</em></p>
<p><em>Wrt your previous post, contrary to appearances, vol. 3 is in fact the best introduction, since it includes the full transcript of the original SR conference (year zero!)</em></p>
<p><em>And finally, one of the contributors to the ‘geophilosophy’ volume is Tim Morton, who you also discuss below (’speculative-realist-ecodeconstructionism’ set to become the next ‘next big thing?’</em></p></blockquote>
<p>I&#8217;m not a great reader of Collapse (it was the home of Harman&#8217;s much discussed theory of Causation), but the coming issue certainly does strike a chord of interest, and Tim does a very nice job giving the context of the subject matter. For those of us interested in the local ethic which SR/OOP proliferation involves, the question of what substantive effect this loose theorizing and cadre-building (in particular the Harman/Levi variety) is having upon blogged philosophy, this new Orthodoxy associated chill is perhaps of abiding interest. In this way, as urbanomic says, if Collapse is an &#8220;SR update&#8221; I&#8217;m really not interested in reading it (though perhaps many people will be). Hopefully there will be other, more diverse ideas  involved. From the subject so described, I would have loved to have written on it.</p>
<p>Plus, I look forward to Tim&#8217;s promised comments on the question of Orientalization, either in Harman&#8217;s thinking (where it runs rampant) or in terms of ecophilosophy.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ Patents: Microsoft cap a fine of 388 million dollars ]]></title>
<link>http://scriptforall.wordpress.com/2009/11/18/patents-microsoft-cap-a-fine-of-388-million-dollars/</link>
<pubDate>Wed, 18 Nov 2009 17:09:08 +0000</pubDate>
<dc:creator>kostland</dc:creator>
<guid>http://scriptforall.wordpress.com/2009/11/18/patents-microsoft-cap-a-fine-of-388-million-dollars/</guid>
<description><![CDATA[D `access condamn for violation of patent, Microsoft has finally T jug not culprit in call by a cour]]></description>
<content:encoded><![CDATA[D `access condamn for violation of patent, Microsoft has finally T jug not culprit in call by a cour]]></content:encoded>
</item>
<item>
<title><![CDATA[Points and Objects]]></title>
<link>http://naughtthought.wordpress.com/2009/11/18/points-and-objects/</link>
<pubDate>Wed, 18 Nov 2009 06:16:03 +0000</pubDate>
<dc:creator>Ben Woodard</dc:creator>
<guid>http://naughtthought.wordpress.com/2009/11/18/points-and-objects/</guid>
<description><![CDATA[Levi has an interesting post about quantum mechanics and Speculative Realism. A whole slew of issues]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img class="alignnone" title="process" src="http://www.ctr4process.org/images/cosmo.JPG" alt="" width="393" height="408" /></p>
<p>Levi has an interesting <a href="http://larvalsubjects.wordpress.com/2009/11/13/misconceptions-about-quantum-mechanics/">post</a> about quantum mechanics and Speculative Realism. A whole slew of issues arises surrounding epistemological versus ontological realism particularly in regards to the issue of observation and the uncertainty principle. As the Dailykos post he references makes clear, decoherence does not assert that everything depends on observation, but that at some point quantum phenomenon appears as macroscopic reality.  While decoherence does not explain this transition it does not justify, as Gabriel Catren makes clear in his contribution to Collapse V, a mathematized transcendental couplet comprised of observer and experience (or correlationism).</p>
<p><!--more--></p>
<p>Catren describes physics as a theory of objects made of a formalism (mechanics) and many kinds of objects (such as fields, particles, systems and so forth). The bulk of the essay is dedicated to showing how QM demonstrates objects and qualities as self synthesizing without the need to appeal to a transcendental subject. Objects are then defined as &#8220;a set of invariant objective properties that manifests itself through a phenomenological multiplicity of phases.&#8221;</p>
<p>But the source of objective or invariant components becomes problematic if objects only ever become other objects ad infinitum. Catren&#8217;s response to this is the utilization of universal operators which he likens to Whitehead&#8217;s eternal objects also refering to them as universal ideas.  These ideas which make ingressions into nature are discussed in terms of mathematics &#8211; any given object is an expression of certain universal measurements or other physical properties.</p>
<p><img class="alignnone" title="constellation" src="http://www.zodiacsignsastrology.us/zodiac-signs-pictures/scorpio-constellation-2.jpg" alt="" width="512" height="374" /></p>
<p>What I cant grasp is how the universal ideas (if they are to avoid anthrocentrism) can be separated from being a thinkable potentiality such as Deluze&#8217;s category of the virtual. Steven Shaviro made this connection some time ago <a href="http://www.shaviro.com/Blog/?p=578">here</a>. It seems that there can be no guarantee as to the contours of conceptualization (via Brassier) or of transformation (against Meillassoux&#8217;s logical access to chaos).  This is the crucial importance of identity in the Laruelleian sense. Yet even in Laruelle there is the tension between the object and the point (the object being the zero-point of being).</p>
<p>The issue remains that the object (at least as it is used by Harman and Bryant) is a relocation and shrinkage of being (or ground in the Schellingnian sense) whereas the point (functioning in place of the object) is a formalization of an epistemological limit regarding becoming. For OOO/OOP it seems that being becomes de-humanized (flattened) whereas for tm/neo-vitalism it is the ignorance surrounding the absolute which is flattened or annihilated. The function of thinking in the former remains an enigma.</p>
<p>Also, see Michael&#8217;s excellent post <a href="http://buymeout.wordpress.com/2009/11/17/on-vicarious-head-scratching/">here</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[On Vicarious Head-Scratching]]></title>
<link>http://buymeout.wordpress.com/2009/11/17/on-vicarious-head-scratching/</link>
<pubDate>Tue, 17 Nov 2009 17:20:46 +0000</pubDate>
<dc:creator>Michael</dc:creator>
<guid>http://buymeout.wordpress.com/2009/11/17/on-vicarious-head-scratching/</guid>
<description><![CDATA[I&#8217;ve been seeing a lot on Harman and capitalism and his model of causation as &#8220;nonsense]]></description>
<content:encoded><![CDATA[I&#8217;ve been seeing a lot on Harman and capitalism and his model of causation as &#8220;nonsense]]></content:encoded>
</item>
<item>
<title><![CDATA[a Null object minta használata Doctrine-nal]]></title>
<link>http://blerou.wordpress.com/2009/11/16/null-object-minta-hasznalata-doctrine/</link>
<pubDate>Mon, 16 Nov 2009 22:39:46 +0000</pubDate>
<dc:creator>Szabolcs Sulik</dc:creator>
<guid>http://blerou.wordpress.com/2009/11/16/null-object-minta-hasznalata-doctrine/</guid>
<description><![CDATA[A null object mintáról sok helyen lehet olvasni. Alapvetően arról van szó, hogy abban az esetben, am]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A <a href="http://en.wikipedia.org/wiki/Null_Object_pattern">null object mintá</a>ról <a href="http://www.cookiepattern.com/2008/07/null-object-pattern.html">sok helyen</a> <a href="http://martinfowler.com/eaaCatalog/specialCase.html">lehet olvasni</a>. Alapvetően arról van szó, hogy abban az esetben, amikor egy objektum példányt kellene kapnod (mondjuk egy factory-tól), de az a feltételeknek megfelelő objektumot nem tud biztosítani, akkor nem null-t ad vissza, hanem egy úgynevezett null objektumot, amely típusában, viselkedésében megfelel egy &#8220;rendes&#8221; objektumnak.</p>
<p>A minta előnye, hogy nem kell folyamatosan vizsgálnunk a kapott értéket (null-e vagy objektum példány), egyszerűen csak használjuk. Hogy mire is jó, arra lássunk egy példát.</p>
<p><!--more-->Tegyük fel, hogy van egy galériánk, amelyben (mily meglepő) képek találhatók. A galériának van egy kiemelt képe, amellyel megjelenik az oldalon. Feladat: hogyan tudjuk egyszerűen elérni, hogy azok a galériák, amelyeknek nincs kiemelt képe, egy &#8220;no-image.jpg&#8221;-et jelenítsenek meg?</p>
<p>Kezdjük az elején. A sémával.</p>
<pre>Gallery:
  tableName: gallery
  columns:
    id:
      type: integer
      unsigned: true
      notnull: true
      primary: true
      autoincrement: true
    name:
      type: string(200)
    preview_image_id:
      type: integer
      unsigned: true
      notnull: true
  relations:
    PreviewImage:
      local: preview_image_id
      foreign: id
      type: one
      class: Image
Image:
  tableName: picture
  columns:
    id:
      type: integer
      unsigned: true
      notnull: true
      primary: true
      autoincrement: true
    gallery_id:
      type: integer
      unsigned: true
      notnull: true
    file:
      type: string(255)
    title:
      type: string(255)
  relations:
    Gallery:
      local: gallery_id
      foreign: id
      foreignAlias: Images
      onDelete: CASCADE</pre>
<p>Ezzel a sémával már működni fog a galéria. Mint látható, a galéria tartalmaz egy <em>preview_image_id</em> mezőt, amely az előképre hivatkozás (ennek a mezőnek a kezelése a fejlesztőre hárul, általában egy, a galériába feltöltött képek közül). Mi történik akkor, ha most megprólájuk megjeleníteni az előképet?</p>
<p>Mindjárt meglátjuk, de előbb írjunk egy kis kódot. Készítsünk egy egyszerű API-t a képek kezeléséhez.</p>
<pre>class Image extends BaseImage
{
  const TYPE_ORIGINAL = 1;
  const TYPE_THUMBNAIL = 2;

  // ...
  public function getImageName($type = self::TYPE_ORIGINAL)
  {
    $info = pathinfo($this-&#62;file);
    $names = array(
      self::TYPE_ORIGINAL =&#62; $this-&#62;file,
      self::TYPE_THUMBNAIL =&#62; $info['filename'].'_thumb.'.$info['extension'],
    );

    if (!isset($names[$type]))
    {
      throw new InvalidArgumentException();
    }

    return $names[$type];
  }

  public function getImagePath($absolute = true)
  {
    $path = '/uploads/images';
    $absolute_path = sfConfig::get('sf_web_dir').$path;

    if (!file_exists($absolute_path))
    {
      mkdir($absolute_path, 0777, true);
      chmod($absolute_path, 0777);
    }

    return $absolute ? $absolute_path : $path;
  }

  public function getImageFile($type = self::TYPE_ORIGINAL, $absolute = false)
  {
    return $this-&#62;getImagePath($absolute).'/'.$this-&#62;getImageFile($type);
  }
  // ...
}</pre>
<p>Szóval mi történik, ha megpróbáljuk megjeleníteni az előképet?</p>
<pre>&#60;img src="&#60;? echo $gallery-&#62;PreviewImage-&#62;getImageFile(); ?&#62;" /&#62;</pre>
<p>Hát az attól függ <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Ha van előkép, akkor megjelenik. Ha nincs, akkor viszont egy fatal error a jutalmunk. Tehát meg kell vizsgálnunk, hogy létezik-e az előkép. Sokkal kényelmesebb lenne, ha előkép beállítás nélkül is egy <em>Image</em> objektumot kapnánk (null object), amelyen meghívva a <em>getImageFile()</em> metódust, az alapértelmezett képet jelenítené meg.</p>
<p>Ehhez két dolog szükséges:</p>
<ol>
<li>a doctrine, beállítás nélkül is egy <em>Image</em> példányt adjon</li>
<li>file megadás nélkül az alapértelmezett képet adja vissza</li>
</ol>
<p>Az első pont könnyen teljesíthető. Változtassunk a sémán. A <em>Gallery</em> <em>preview_image_id</em> mezőjéről vegyük le a <em>notnull</em> előírást. Ekkor a doctrine egy frissen létrehozott <em>Image</em> példányt ad (roppant kellemes működés).</p>
<p>A második ponthoz kicsit át kell írni két metódust: <em>getImageName()</em>, <em>getImageFile()</em>.</p>
<pre>class Image extends BaseImage
{
  // ...
  public function getImageName($type = self::TYPE_ORIGINAL)
  {
    if ($this-&#62;file)
    {
      $info = pathinfo($this-&#62;file);
      $names = array(
        self::TYPE_ORIGINAL =&#62; $this-&#62;file,
        self::TYPE_THUMBNAIL =&#62; $info['filename'].'_thumb.'.$info['extension'],
      );
    }
    else
    {
      $names = array(
        self::TYPE_ORIGINAL =&#62; '/images/no_image.jpg',
        self::TYPE_THUMBNAIL =&#62; '/images/no_image_thumb.jpg',
      );
    }

    if (!isset($names[$type]))
    {
      throw new InvalidArgumentException();
    }

    return $names[$type];
  }

  public function getImageFile($type = self::TYPE_ORIGINAL, $absolute = false)
  {
    if (!$this-&#62;file)
    {
      return $this-&#62;getImageName($type);
    }
    return $this-&#62;getImagePath($absolute).'/'.$this-&#62;getImageFile($type);
  }
  // ...
}</pre>
<p>Még egyszer kiemelném a Doctrine azon viselkedését, hogy <strong>az idegenkulcsról ha eltávolítjuk a </strong><em><strong>notnull</strong></em><strong> előírást, akkor a kapcsolt model lekérésekor nem null-t, hanem üres objektumot kapunk</strong>. A modelhez hozzáadott kód nagy előnye, hogy több képet szolgáltató objektum esetén alkalmazva egységes felületet kapunk. Emellett a <em>getImagePath()</em> nagyszerűen használható a feltöltő form validatorának <em>path</em> opciójaként.</p>
<p>Úgy gondolom ennyi. Várom a véleményeket, kritikákat <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Content of first session]]></title>
<link>http://abumuslimamr.wordpress.com/2009/11/16/contest-of-first-session/</link>
<pubDate>Mon, 16 Nov 2009 21:08:15 +0000</pubDate>
<dc:creator>abumuslimamr</dc:creator>
<guid>http://abumuslimamr.wordpress.com/2009/11/16/contest-of-first-session/</guid>
<description><![CDATA[C++ and C : C++ evolved from C, which evolved from two previous programming languages, BCPL and B. B]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong><span style="text-decoration:underline;">C++ and C :</span></strong></p>
<p>C++ evolved from C, which evolved from two previous programming languages, BCPL and B.</p>
<p>BCPL was developed in 1967 by Martin Richards as a language for writing operating-systems software and compilers for operating systems.</p>
<p>The C language was evolved from B by Dennis Ritchie at Bell Laboratories. C uses many important concepts of BCPL and B.</p>
<p>C initially became widely known as the development language of the UNIX</p>
<p>operating system. <span style="text-decoration:underline;">Today, most operating systems are written in C and/or C++. </span></p>
<p>American National Standards Institute (ANSI) cooperated with the International Standardization Organization (ISO) to standardize C worldwide; the joint standard document was published in 1990.</p>
<p>C++, an extension of C, was developed by Bjarne Stroustrup in the early 1980s at Bell Laboratories. C++ provides a number of features that &#8220;spruce up&#8221; the C language, but more importantly, it provides capabilities for object-oriented programming.</p>
<p><strong><span style="text-decoration:underline;">Basic Program Construction :</span></strong></p>
<p><strong><span style="text-decoration:underline;"> </span></strong></p>
<p>Let’s look at a very simple C++ program. This program is called FIRST, so its source file is FIRST.CPP.</p>
<p>It simply prints a sentence on the screen. Here it is:</p>
<p>#include &#60;iostream&#62;</p>
<p>using namespace std;</p>
<p>int main()</p>
<p>{</p>
<p>cout &#60;&#60; “We are TENNIN programmers\n”;</p>
<p>return 0;</p>
<p>}</p>
<p>Despite its small size, this program demonstrates a great deal about the construction of C++</p>
<p>programs. Let’s examine it in detail.</p>
<ul>
<li><strong><span style="text-decoration:underline;">Functions:</span></strong><strong> </strong>Functions are one of the fundamental building blocks of C++. The “FIRST “program consists of a single function called main(). The only parts of this program that are not part of the function are the first two lines. the ones that start with #include and using. (We’ll see what these lines do in a moment.)<strong> </strong></li>
</ul>
<p><strong> </strong></p>
<ul>
<li><strong><span style="text-decoration:underline;">Function Name:</span></strong><strong> </strong>The parentheses following the word main are the distinguishing feature of a function. Without the parentheses the compiler would think that main refers to a variable or to some other program element. When we discuss functions in the text, we’ll follow the same convention that C++ uses: We’ll put parentheses following the function name. The word int preceding the function name indicates that this particular function has a return value of type int.</li>
</ul>
<ul>
<li><strong><span style="text-decoration:underline;">Braces and the Function Body:</span></strong><strong> </strong>The <em>body </em>of a function is surrounded by <em>braces </em>(sometimes called <em>curly brackets). </em>These braces<strong> </strong>play the same role as the BEGIN and END keywords in some other languages: They surround or<strong> </strong><em>delimit </em>a block of program statements. Every function must use this pair of braces around the<strong> </strong>function body. In this example there are only two statements in the function body: the line starting<strong> </strong>with cout, and the line starting with return. However, a function body can consist of many.<strong> </strong></li>
</ul>
<p><strong> </strong></p>
<ul>
<li><strong><span style="text-decoration:underline;">Always Start with main()</span></strong></li>
</ul>
<p>When you run a C++ program, the first statement executed will be at the beginning of a function called main(). The program may consist of many functions, classes, and other program elements, but on startup, control always goes to main(). If there is no function called main() in your program, an error will be signaled. In most C++ programs, as we’ll see later, main() calls member functions in various objects to carry out the program’s real work. The main() function may also contain calls to other standalone functions</p>
<ul>
<li><strong><span style="text-decoration:underline;">Program Statements</span></strong></li>
</ul>
<p><strong> </strong></p>
<ul>
<li>cout &#60;&#60; “We are TENNIN programmers”;</li>
<li>return 0;</li>
</ul>
<p>The first statement tells the computer to display the quoted phrase. Most statements tell the computer to do something. In this respect, statements in C++ are similar to statements in other languages. In fact, as we’ve noted, the majority of statements in C++ are identical to statements in C.</p>
<p>A semicolon signals the end of the statement. This is a crucial part of the syntax but easy to forget. In some languages (like BASIC), the end of a statement is signaled by the end of the line, but that’s not true in C++. If you leave out the semicolon, the compiler will often (although not always) signal an error. The last statement in the function body is return 0;. This tells main() to return the value 0 to whoever called it, in this case the operating system or compiler. We’ll learn more about return later.</p>
<ul>
<li><strong><span style="text-decoration:underline;">Whitespace</span></strong></li>
</ul>
<p><strong> </strong></p>
<p>We mentioned that the end of a line isn’t important to a C++ compiler. Actually, the compiler ignores whitespace almost completely. <em>Whitespace </em>is defined as spaces, carriage returns, linefeeds, tabs, vertical tabs, and formfeeds. These characters are invisible to the compiler. You can put several statements on one line, separated by any number of spaces or tabs, or you can run a statement over two or more lines. It’s all the same to the compiler. Thus the FIRST program could be written this way:</p>
<p>#include &#60;iostream&#62;</p>
<p>using</p>
<p>namespace std;</p>
<p>int main () { cout</p>
<p>&#60;&#60;</p>
<p>“We are TENNIN programmers\n”</p>
<p>; return</p>
<p>0;}</p>
<p>We don’t recommend this syntax, it’s nonstandard and hard to read—but it does compile</p>
<p>correctly.</p>
<p>There are several exceptions to the rule that whitespace is invisible to the compiler. The first line of the program, starting with #include, is a preprocessor directive, which must be written on one line.</p>
<ul>
<li><strong>Output Using cout</strong></li>
</ul>
<p>As you have seen, the statement</p>
<p>cout &#60;&#60; “We are TENNIN programmers\n”;</p>
<p>causes the phrase in quotation marks to be displayed on the screen. How does this work?</p>
<p>A complete description of this statement requires an understanding of objects, operator overloading, and other topics we won’t discuss until later in the book, but here’s a brief preview. The identifier cout (pronounced “C out”) is actually an <em>object. </em>It is predefined in C++ to correspond to the <em>standard output stream. </em>A <em>stream </em>is an abstraction that refers to a flow of data. The standard output stream normally flows to the screen display—although it can be redirected to other output devices. We’ll discuss streams (and redirection) in Chapter 12, “Streams and Files”.</p>
<p>The operator &#60;&#60; is called the <em>insertion </em>or <em>put to </em>operator. It directs the contents of the variable on its right to the object on its left. In FIRST it directs the string constant “Every age has a language of its own\n” to cout, which sends it to the display.</p>
<p>Although the concepts behind the use of cout and &#60;&#60; may be obscure at this point, using them is easy.They’ll appear in almost every example program.</p>
<ul>
<li><strong>Directives</strong></li>
</ul>
<p>The two lines that begin the FIRST program are directives. The first is a preprocessor directive, and the second is a using directive.</p>
<p>They occupy a sort of gray area: They’re not part of the basic C++ language, but they’re necessary anyway.</p>
<ul>
<li><strong>Preprocessor Directives</strong></li>
</ul>
<p>The first line of the FIRST program,</p>
<p>#include &#60;iostream&#62;</p>
<p>The preprocessor directive #include tells the compiler to insert another file into your source file. In effect, the #include directive is replaced by the contents of the file indicated. Using an #include directive to insert another file into your source file is similar to pasting a block of text into a document with your word processor.</p>
<ul>
<li><strong>Header Files</strong></li>
</ul>
<p>In the FIRST example, the preprocessor directive #include tells the compiler to add the source file IOSTREAM to the FIRST.CPP source file before compiling. Why do this? IOSTREAM is an example of a <em>header file </em>(sometimes called an <em>include file). </em>It’s concerned with basic input/output operations, and contains declarations that are needed by the cout identifier and the &#60;&#60; operator. Without these declarations, the compiler won’t recognize cout and will think &#60;&#60; is being used incorrectly. There are many such include files. The newer Standard C++ header files don’t have a file extension, but some older header files, left over from the days of the C language, have the extension .H.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ Hadopi: associations propose that the Net surfers pay &quot; a right of division of the fichiers&quot; ]]></title>
<link>http://softwarestechnologies.wordpress.com/2009/11/16/hadopi-associations-propose-that-the-net-surfers-pay-a-right-of-division-of-the-fichiers/</link>
<pubDate>Mon, 16 Nov 2009 17:18:22 +0000</pubDate>
<dc:creator>garaffi</dc:creator>
<guid>http://softwarestechnologies.wordpress.com/2009/11/16/hadopi-associations-propose-that-the-net-surfers-pay-a-right-of-division-of-the-fichiers/</guid>
<description><![CDATA[Lgislation &#8211; Five euros per month and Net surfer, voil the subjected concept the Zelnik missio]]></description>
<content:encoded><![CDATA[Lgislation &#8211; Five euros per month and Net surfer, voil the subjected concept the Zelnik missio]]></content:encoded>
</item>
<item>
<title><![CDATA[ Microsoft places containers waiters in its new datacenters ]]></title>
<link>http://scriptforall.wordpress.com/2009/11/16/microsoft-places-containers-waiters-in-its-new-datacenters/</link>
<pubDate>Mon, 16 Nov 2009 17:14:04 +0000</pubDate>
<dc:creator>kostland</dc:creator>
<guid>http://scriptforall.wordpress.com/2009/11/16/microsoft-places-containers-waiters-in-its-new-datacenters/</guid>
<description><![CDATA[Google N `is not the only actor it Internet has to build centers of give hbergeant containers, since]]></description>
<content:encoded><![CDATA[Google N `is not the only actor it Internet has to build centers of give hbergeant containers, since]]></content:encoded>
</item>
<item>
<title><![CDATA[OOP dan Pemrograman berstruktur]]></title>
<link>http://ubayshare.wordpress.com/2009/11/16/oop-dan-pemrograman-berstruktur/</link>
<pubDate>Mon, 16 Nov 2009 11:46:57 +0000</pubDate>
<dc:creator>ubaystenlly</dc:creator>
<guid>http://ubayshare.wordpress.com/2009/11/16/oop-dan-pemrograman-berstruktur/</guid>
<description><![CDATA[Object Oriented Programing atau yang biasa dikenal dengan OOP adalah suatu pemrograman yang mengarah]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Object Oriented Programing atau yang biasa dikenal dengan OOP adalah suatu pemrograman yang mengarah pada objek. Object oriented juga disebut sebagai paradigma pemrograman.  Procedural Programming atau biasa disebut dengan pemrograman terstruktur adalah pemrograman yang disusun berdasarkan urutan tertentu.  Perbedaan mendasar antara OOP dan pemrograman terstruktur adalah:</p>
<p><!--more--></p>
<p>Dengan menggunakan OOP maka dalam melakukan pemecahan suatu masalah kita tidak melihat bagaimana cara menyelesaikan suatu masalah tersebut (terstruktur) tetapi objek-objek apa yang dapat melakukan pemecahan masalah tersebut. Sedangkan untuk pemrograman terstruktur,  menggunakan prosedur/tata cara yang teratur untuk mengoperasikan data struktur  Untuk tata nama, keduanya pun memiliki tatanan yang sama walaupun memiliki pengertian tersendiri:  object oriented menggunakan “method” sedangkan terstruktur menggunakan “function”. Bila di OOP sering didengar mengenai “objects” maka di terstruktur kita mengenalnya dengan ” modules”. Begitu pula  halnya dengan “message” pada OO dan “argument” pada terstruktur. “attribute” pada OO juga memiliki tatanan nama yang sepadan dengan “variabel” pada pemrograman terstruktur.  Persamaan kedua pemrogaman  adalah keduanya termasuk ke dalam pemodelan pemrograman yang digunakan dewasa ini.  Mana yang lebih baik  tidak ada yang dapat dikatakan lebih baik karena keduanya memiliki spesifikasi tersendiri dalam pemrogramannya. Hal ini juga tergantung pada bagaimana pribadi si pemrogram ingin menyusun program yang akan dibuatnya. Apakah lebih suka menggunakan yang berorientasikan pada objek maupun pemrograman yang terstruktur.  Kapan sama2 baik  Pemrograman prosedural akan dikatakan lebih baik apabila dalam segala situasi melibatkan kompleksitas moderat atau yang memerlukan signifikan kemudahan maintainability. Manfaat yang dirasakan dalam penggunaan pemrograman prosedural adalah kemampuan kembali menggunakan kode yang sama tanpa menggunakan kode yang berbeda ataupun mengkopinya kembali. Dengan menggunakan “goto”, memudahkan programmer melacak kumpulan data sehingga menghindarkan pemrograman terstruktur menjadi seperti spagethii code.  Pemrograman berorientasikan objek dikatakan lebih baik apabila Model data berorientasi objek dikatakan dapat memberi fleksibilitas yang lebih, kemudahan mengubah program, dan digunakan luas dalam teknik piranti lunak skala besar. Lebih jauh lagi, pendukung OOP mengklaim bahwa OOP lebih mudah dipelajari bagi pemula dibanding dengan pendekatan sebelumnya, dan pendekatan OOP lebih mudah dikembangkan dan dirawat.</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
