<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>RyanKeeter - A Soldier in a Tie</title><link>http://www.ryankeeter.com/</link><description /><generator>Graffiti CMS 1.1 (build 1.1.0.1114)</generator><lastBuildDate>Wed, 07 Jan 2009 18:28:00 GMT</lastBuildDate><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ryankeeter" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>Good Morning Afghanistan!</title><link>http://feedproxy.google.com/~r/ryankeeter/~3/cdG2d07mB8E/</link><pubDate>Wed, 07 Jan 2009 18:28:00 GMT</pubDate><guid isPermaLink="false">http://www.ryankeeter.com/war/good-morning-afghanistan/</guid><dc:creator>The Admin</dc:creator><slash:comments>3</slash:comments><category domain="http://www.ryankeeter.com/war/">War</category><description>&lt;p&gt;&amp;nbsp;&amp;nbsp; You may be asking yourself &amp;ldquo;why the hell is he going to Afghanistan, isn&amp;rsquo;t it dangerous there?&amp;rdquo; And the answer to your question is a resounding &amp;ldquo;yes,&amp;rdquo; but I am going because I am an Army Officer for the United States and sometimes one must put on the uniform and boots and go to war. However, this trip isn&amp;rsquo;t without it&amp;rsquo;s perks, by doing such a mission one can advance their career, get training and experience that will never be available again, and can learn great deals about themselves at an emotional and psychological level.&lt;a href="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/BeginningmytiptoAfghanistan_608B/Ryan's%20Class%20A%20Picture_2.jpg"&gt;&lt;img height="484" border="0" align="right" width="376" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/BeginningmytiptoAfghanistan_608B/Ryan's%20Class%20A%20Picture_thumb.jpg" alt="Ryan's Class A Picture" style="border-width: 0px; display: inline; margin-left: 0px; margin-right: 0px;" title="Ryan's Class A Picture" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; In war, as in other stressful periods of one&amp;rsquo;s life, a new awareness of one&amp;rsquo;s inner thoughts and desires begins to show. The days become long and arduous as the winter months pass slowly. In the Summer, the sun pounds upon your head persistently, never faltering, but always powerful. My mind will bend towards thoughts of family and life in my home country, but my will will force me to drive on with the day to day operations. Often I think about my future plans, my goals and the life I will have with my wife and son in the days after the deployment. However, the days after the deployment might never come, for this is war, and only war itself can dictate my life; not I, nor my rifle.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; The will of a man can be determined through his patriotism. No great leader has said this, but I believe this as the best men and women I have met had more patriotism and passion then most. When the shots are firing and the smoke is in the air, you want the person that can be trusted with your life next to you, and more than likely, those people have shown a great deal of patriotism.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; The duration of this tour will be 400 days, give or take, from February 2009 as the starting point. The tour should allow for a trip back to the states for time with my family (and I hope that I&amp;rsquo;ll be able to choose this time). I shall do my best to continue to maintain a social presence, but saying that it will be hard is an understatement. I wish all of my friends good luck and fun in their lives.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Rockin,&lt;/p&gt;
&lt;p&gt;1LT Ryan Keeter&lt;/p&gt;
&lt;object width="464" height="350"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2751624&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=1&amp;amp;color=ff0000&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=2751624&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=1&amp;amp;color=ff0000&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="464" height="350"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;p&gt;&lt;br /&gt;
&lt;a href="http://vimeo.com/2751624"&gt;Going to Afghanistan&lt;/a&gt; from &lt;a href="http://vimeo.com/user918773"&gt;ryankeeter&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;..&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ryankeeter/~4/cdG2d07mB8E" height="1" width="1"/&gt;</description><author>RyanKeeter - A Soldier in a Tie &lt;graffiti@yoursite.com&gt;</author><feedburner:origLink>http://www.ryankeeter.com/war/good-morning-afghanistan/</feedburner:origLink></item><item><title>Script Tip: Cross Domain calls and JSONP</title><link>http://feedproxy.google.com/~r/ryankeeter/~3/Jlsuh9TVIYA/</link><pubDate>Fri, 12 Dec 2008 05:31:00 GMT</pubDate><guid isPermaLink="false">http://www.ryankeeter.com/videos/scripttips/script-tip-cross-domain-calls-and-jsonp/</guid><dc:creator>The Admin</dc:creator><slash:comments>0</slash:comments><category domain="http://www.ryankeeter.com/videos/scripttips/">Script Tips</category><description>&lt;p style="text-align:center;"&gt;&lt;object width="800" height="603"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2502332&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=1&amp;amp;color=ff0000&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=2502332&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=1&amp;amp;color=ff0000&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="800" height="603"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;a href="http://vimeo.com/2502332"&gt;Script Tips : JSONP and the Cross Domain Request&lt;/a&gt; from &lt;a href="http://vimeo.com/user918773"&gt;ryankeeter&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Download this video in its entirety to watch later here: &lt;a href="http://vimeo.com/download/video:86654442?e=1229063697&amp;amp;h=3962e5e4945f396eb1e37d178e447e3e&amp;amp;uh=058c1b0cf12b54bf45add89a2b080fd7"&gt;Download script tip # 1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ryankeeter/~4/Jlsuh9TVIYA" height="1" width="1"/&gt;</description><author>RyanKeeter - A Soldier in a Tie &lt;graffiti@yoursite.com&gt;</author><feedburner:origLink>http://www.ryankeeter.com/videos/scripttips/script-tip-cross-domain-calls-and-jsonp/</feedburner:origLink></item><item><title>Snap Pic : Kickin' Keurig Coffee Selection at my Work</title><link>http://feedproxy.google.com/~r/ryankeeter/~3/zvirNsdw5T8/</link><pubDate>Thu, 11 Dec 2008 23:07:59 GMT</pubDate><guid isPermaLink="false">http://www.ryankeeter.com/pic/snap-pic-kickin-keurig-coffee-selection-at-my-work/</guid><dc:creator>The Admin</dc:creator><slash:comments>0</slash:comments><category domain="http://www.ryankeeter.com/pic/">pic</category><description>&lt;p&gt;&lt;a href="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/SnapPicKickinKeurigCoffeeSelectionatmyWo_F16D/100_0203.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="716" alt="100_0203" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/SnapPicKickinKeurigCoffeeSelectionatmyWo_F16D/100_0203_thumb.jpg" width="954" border="0"&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ryankeeter/~4/zvirNsdw5T8" height="1" width="1"/&gt;</description><author>RyanKeeter - A Soldier in a Tie &lt;graffiti@yoursite.com&gt;</author><feedburner:origLink>http://www.ryankeeter.com/pic/snap-pic-kickin-keurig-coffee-selection-at-my-work/</feedburner:origLink></item><item><title>Silverlight MVVM pt 1: Hello World style</title><link>http://feedproxy.google.com/~r/ryankeeter/~3/DQ8NjgJTPI0/</link><pubDate>Thu, 11 Dec 2008 19:36:00 GMT</pubDate><guid isPermaLink="false">http://www.ryankeeter.com/silverlight/silverlight-mvvm-pt-1-hello-world-style/</guid><dc:creator>The Admin</dc:creator><slash:comments>2</slash:comments><category domain="http://www.ryankeeter.com/silverlight/">Silverlight</category><description>&lt;blockquote&gt;
&lt;p style="background-color: rgb(255,255,250)"&gt;&lt;strong&gt;To Watch the Video of this post, click &lt;a href="http://www.ryankeeter.com/videos/silvertips/silverlight-mvvm-pt-1-hello-world-style/"&gt;HERE&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Holy crap, we have another freaking model to learn?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Yuppers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Does it suck?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Nope, it makes things so much easier, it is a model that leverages what you already know.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What kinda stuff I already know?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You know about separation of concerns?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;yup&lt;/strong&gt;&amp;hellip;&lt;/p&gt;
&lt;p&gt;You know about designing for testability?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;yup&lt;/strong&gt;&amp;hellip;&lt;/p&gt;
&lt;p&gt;you know about the command pattern?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;yup&lt;/strong&gt;&amp;hellip;&lt;/p&gt;
&lt;p&gt;you heard about Model View Controller pattern?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;yup&lt;/strong&gt;&amp;hellip;&lt;/p&gt;
&lt;p&gt;Then you are set, this model leverages all of that, so it is only a matter of applying it and seeing how it all works in this new RIA world!&lt;/p&gt;
&lt;h3&gt;Silverlight Programming, How I Initially Want to do it&lt;/h3&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; Initially, I want to take all of my objects within the XAML, such as the textblocks and the buttons and what not, and I want to give them names and declaratively call them from my code behind. Then, I want to wire them up in my code behind with click events and so what have you. Lets see some of this stuff:&lt;/p&gt;
&lt;p&gt;1. The xaml markup on the front end(just to get some UI out there):&lt;/p&gt;
&lt;pre class="xml" name="code"&gt;

&lt;usercontrol xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:class="MVVM.HelloWorld.Page" width="400" height="300"&gt;
br /&gt;&lt;grid x:name="LayoutRoot" showgridlines="True" background="White"&gt;&lt;/grid&gt;&lt;br /&gt;&lt;grid.columndefinitions&gt;&lt;/grid.columndefinitions&gt;&lt;br /&gt;&lt;columndefinition&gt;&lt;/columndefinition&gt;&lt;br /&gt;&lt;columndefinition&gt;&lt;/columndefinition&gt;&lt;br /&gt;&lt;br /&gt;&lt;grid.rowdefinitions&gt;&lt;/grid.rowdefinitions&gt;&lt;br /&gt;&lt;rowdefinition&gt;&lt;/rowdefinition&gt;&lt;br /&gt;&lt;rowdefinition&gt;&lt;/rowdefinition&gt;&lt;br /&gt;&lt;br /&gt;&lt;textblock x:name="txt1" text="Not Set"&gt;&lt;/textblock&gt;&lt;br /&gt;&lt;textblock x:name="txt2" text="Not Set" grid.column="0" grid.row="1"&gt;&lt;/textblock&gt;&lt;br /&gt;&lt;textblock x:name="txt3" text="Not Set" grid.column="1" grid.row="0"&gt;&lt;/textblock&gt;&lt;br /&gt;&lt;textblock x:name="txt4" text="Not Set" grid.column="1" grid.row="1"&gt;&lt;/textblock
&lt;/usercontrol&gt;&lt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; A picture of the XAML from above is below:&lt;/p&gt;
&lt;p&gt;&lt;a href="$xamlpic17-0.png"&gt;&lt;img title="xaml pic 1" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="429" alt="xaml pic 1" width="601" border="0" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/SilverlightMVVMpart1ofNHelloWorld_A4B2/xaml%20pic1.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. I will be using a people service just to return a person object and then post that data to the UI (by the way, this is an outrageously contrived example that probably teaches you nothing&amp;hellip;but we are getting somewhere)&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
namespace MVVM.HelloWorld
{
    public  class DummyPeopleService :IPeopleService
    {
        public  IList RetrievePeople()
        {
            IList people =  new List
                                        {
             new Person(&amp;quot;Albert&amp;quot;,&amp;quot;al@foo.com&amp;quot;, &amp;quot;Pujols&amp;quot;, &amp;quot;STL&amp;quot;, &amp;quot;63101&amp;quot;),
             new Person(&amp;quot;Jose&amp;quot;, &amp;quot;jo@foo.com&amp;quot;, &amp;quot;Rodriquez&amp;quot;, &amp;quot;LA&amp;quot;, &amp;quot;90210&amp;quot;),
             new Person(&amp;quot;John&amp;quot;, &amp;quot;john@foo.com&amp;quot;, &amp;quot;Franco&amp;quot;, &amp;quot;NY&amp;quot;, &amp;quot;123456&amp;quot;)
                                        };
            return people;
                                   
        }
        public Person GetPersonByEmailAddress(string emailAddress)
        {
            IList people = RetrievePeople();
            return people.Where(p =&amp;gt; p.EmailAddress == emailAddress).First();
        }
    }


    public interface IPeopleService
    {
         IList RetrievePeople();
         Person GetPersonByEmailAddress(string emailAddress);
    }
}
&lt;/pre&gt;
&lt;p&gt;You could imagine what the person object looks like, but I'll go ahead and show it regardless:&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
 namespace MVVM.HelloWorld
{
    public class Person
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string City { get; set; }
        public string Zip { get; set; }
        public string EmailAddress { get; set; }

        public Person(string firstName, string emailAddress, 
            string lastName, string city, string zip)
        {
            FirstName = firstName;
            LastName = lastName;
            City = city;
            Zip = zip;
            EmailAddress = emailAddress;
        }
    }
}
&lt;/pre&gt;
&lt;p&gt;3. The code behind will just grab some data and then put values into the text boxes.This represents the old way of doing things, where we merely grab data and assign values to controls:&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
namespace MVVM.HelloWorld
{
    public partial class Page : UserControl
    {
        private IList people;
        public Page()
        {
            InitializeComponent();
            this.Loaded += Page_Loaded;
        }

        void Page_Loaded(object sender, RoutedEventArgs e)
        {
            IPeopleService svc = new DummyPeopleService();
            var person = svc.GetPersonByEmailAddress(&amp;quot;al@foo.com&amp;quot;);
            txt1.Text = person.FirstName;
            txt2.Text = person.LastName;
            txt3.Text = person.City;
            txt4.Text = person.Zip;
        }
    }

}


&lt;/pre&gt;
&lt;p&gt;4. Below is a picture of this code running:&lt;/p&gt;
&lt;p&gt;&lt;a href="$xamlpic25-0.png"&gt;&lt;img title="xaml pic 2" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="359" alt="xaml pic 2" width="600" border="0" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/SilverlightMVVMpart1ofNHelloWorld_A4B2/xaml%20pic2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to do the above with MVVM&lt;/h3&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now that we have done it one time by having ID&amp;rsquo;s on the elements and specifically putting values to them, lets try it in a different way. First off, I want to get rid of the x:Name attribute that is associated with each element, and I want to bind their text attributes to the value that I want them to bind to. Notice though that they have no clue where that data is coming from. All these textboxes know is that they are going to be getting a property sent their way that has a name that they are going to be looking for, like &amp;ldquo;FirstName,&amp;rdquo; or &amp;ldquo;LastName.&amp;rdquo; I am not defining a declarative type to show where they are coming from(like &amp;quot;person.FirstName&amp;rdquo;).&lt;/p&gt;
&lt;pre class="xml" name="code"&gt;&lt;usercontrol xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:class="MVVM.PartOne.MVVM" width="400" height="300"&gt;&lt;/usercontrol&gt;&lt;br /&gt;   &lt;grid x:name="LayoutRoot" showgridlines="True" background="White"&gt;&lt;/grid&gt;&lt;br /&gt;     &lt;grid.columndefinitions&gt;&lt;/grid.columndefinitions&gt;&lt;br /&gt;     &lt;columndefinition&gt;&lt;/columndefinition&gt;&lt;br /&gt;     &lt;columndefinition&gt;&lt;/columndefinition&gt;&lt;br /&gt;    &lt;br /&gt;   &lt;grid.rowdefinitions&gt;&lt;/grid.rowdefinitions&gt;&lt;br /&gt;        &lt;rowdefinition&gt;&lt;/rowdefinition&gt;&lt;br /&gt;         &lt;rowdefinition&gt;&lt;/rowdefinition&gt;&lt;br /&gt;   &lt;br /&gt;     &lt;textblock text="{Binding FirstName}" margin="68"&gt;&lt;/textblock&gt;&lt;br /&gt;  &lt;textblock text="{Binding LastName}" grid.column="0" grid.row="1" margin="68"&gt;&lt;/textblock&gt;&lt;br /&gt;  &lt;textblock text="{Binding City}" grid.column="1" grid.row="0" margin="68"&gt;&lt;/textblock&gt;&lt;br /&gt;  &lt;textblock text="{Binding Zip}" grid.column="1" grid.row="1" margin="68"&gt;&lt;/textblock&gt;&lt;br /&gt;  &lt;br /&gt;  
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; Now we get to the view model portion of this example. We will crate a view-model that will tie to the appropriate XAML file. For example, we have created an &lt;strong&gt;MVVMviewmodel&lt;/strong&gt;, my default convention is to name it the same as the XAML usercontrol it represents, but just add a &amp;ldquo;viewmodel&amp;rdquo; to the end of it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; You will notice from the code below that there are properties on this class that might be familiar from the binding&amp;nbsp; elements you saw earlier. This viewmodel does somethign interestesting, it accepts the usercontrol that it will be the DataContext for as a constructor (we will show how this all hooks in later).&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
namespace MVVM.PartOne
{

    public class MVVMviewmodel
    {
        private MVVM view;
        public string FirstName{ get; set;}
        public string LastName{ get; set;}
        public string City { get; set; }
        public string Zip { get; set; }
        private IPeopleService svc;
        public MVVMviewmodel(MVVM view, IPeopleService svc)
        {
            this.view = view;
            this.svc = svc;
            Initialize();    
        }
        private void Initialize()
        {
            var p = svc.GetPersonByEmailAddress(&amp;quot;john@foo.com&amp;quot;);
            FirstName = p.FirstName;
            LastName = p.LastName;
            City = p.City;
            Zip = p.Zip;
        }
    }
}
&lt;/pre&gt;
&lt;p&gt;Below is the new code behind, it is much easier to define now, we are merely creating a new instance of the viewmodel and passing in the MVVM class. The values get bound by setting the &lt;strong&gt;Datacontext&lt;/strong&gt; for the &lt;strong&gt;UserControl&lt;/strong&gt;.&lt;/p&gt;
&lt;pre class="csharp" name="code"&gt;
namespace MVVM.PartOne
{
    public partial class MVVM : UserControl
    {
        private readonly MVVMviewmodel vm;
        public MVVM()
        {
            InitializeComponent();

            vm = new MVVMviewmodel(this, new DummyPeopleService());
            DataContext = vm;
        }
    }
}
&lt;/pre&gt;
&lt;p&gt;When this is ran, I get the same results as earlier:&lt;/p&gt;
&lt;p&gt;&lt;a href="$xamlpic35-0.png"&gt;&lt;img title="xaml pic 3" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="371" alt="xaml pic 3" width="600" border="0" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/SilverlightMVVMpart1ofNHelloWorld_A4B2/xaml%20pic3.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; This is a HIGHLY contrived example of this in action, but we will move on to better examples in the future.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt;Ryan&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ryankeeter/~4/DQ8NjgJTPI0" height="1" width="1"/&gt;</description><author>RyanKeeter - A Soldier in a Tie &lt;graffiti@yoursite.com&gt;</author><feedburner:origLink>http://www.ryankeeter.com/silverlight/silverlight-mvvm-pt-1-hello-world-style/</feedburner:origLink></item><item><title>Silverlight MVVM Screencast pt 1</title><link>http://feedproxy.google.com/~r/ryankeeter/~3/R3FgQ4KfoMM/</link><pubDate>Thu, 11 Dec 2008 16:38:00 GMT</pubDate><guid isPermaLink="false">http://www.ryankeeter.com/videos/silvertips/silverlight-mvvm-pt-1-hello-world-style/</guid><dc:creator>The Admin</dc:creator><slash:comments>0</slash:comments><category domain="http://www.ryankeeter.com/videos/silvertips/">Silverlight Tips</category><description>&lt;p style="text-align: center;"&gt;&lt;embed height="603" width="800" src="http://vimeo.com/moogaloop.swf?clip_id=2495612&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=1&amp;amp;color=ff0000&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always"&gt;&lt;/embed&gt;&lt;br /&gt;
&lt;a href="http://vimeo.com/2495612"&gt;Silver Tips : MVVM pt1 =&amp;gt; Hello World&lt;/a&gt; from &lt;a href="http://vimeo.com/user918773"&gt;ryankeeter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can see this in Text format by going to the blog post: &lt;a href="http://www.ryankeeter.com/silverlight-mvvm-pt-1-hello-world-style/"&gt;http://www.ryankeeter.com/silverlight-mvvm-pt-1-hello-world-style/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can download the above video in full resolution here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://vimeo.com/download/video:86641899?e=1229016454&amp;amp;h=73688a796c568db98d72a17a428c3a1c&amp;amp;uh=8dfc1ee209d84c7bb3c3c4c54972b043"&gt;Download Movie&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ryankeeter/~4/R3FgQ4KfoMM" height="1" width="1"/&gt;</description><author>RyanKeeter - A Soldier in a Tie &lt;graffiti@yoursite.com&gt;</author><feedburner:origLink>http://www.ryankeeter.com/videos/silvertips/silverlight-mvvm-pt-1-hello-world-style/</feedburner:origLink></item><item><title>Group Picture at the end of BarCampSTL</title><link>http://feedproxy.google.com/~r/ryankeeter/~3/LGC6EpBUrQg/</link><pubDate>Thu, 11 Dec 2008 15:40:19 GMT</pubDate><guid isPermaLink="false">http://www.ryankeeter.com/pic/group-picture-at-the-end-of-barcampstl/</guid><dc:creator>The Admin</dc:creator><slash:comments>0</slash:comments><category domain="http://www.ryankeeter.com/pic/">pic</category><description>&lt;p&gt;&lt;img height="635" src="http://farm4.static.flickr.com/3293/3107868088_f6f98799e5_b.jpg" width="845"&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ryankeeter/~4/LGC6EpBUrQg" height="1" width="1"/&gt;</description><author>RyanKeeter - A Soldier in a Tie &lt;graffiti@yoursite.com&gt;</author><feedburner:origLink>http://www.ryankeeter.com/pic/group-picture-at-the-end-of-barcampstl/</feedburner:origLink></item><item><title>Series Planned: Through Hoops with Silverlight and MVVM</title><link>http://feedproxy.google.com/~r/ryankeeter/~3/XNcFPa_WPI4/</link><pubDate>Fri, 05 Dec 2008 06:39:00 GMT</pubDate><guid isPermaLink="false">http://www.ryankeeter.com/videos/silvertips/series-planned-through-hoops-with-silverlight-and-mvvm/</guid><dc:creator>The Admin</dc:creator><slash:comments>2</slash:comments><category domain="http://www.ryankeeter.com/videos/silvertips/">Silverlight Tips</category><description>&lt;p&gt;&lt;strong&gt;UPDATE: Due to some &lt;/strong&gt;&lt;a href="http://www.ryankeeter.com/war/good-morning-afghanistan/"&gt;&lt;strong&gt;odd circumstances&amp;nbsp; &lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;I will be unable to update these posts for a while..I shall return to them however when time allows. I apologize!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have been racking my brain lately trying to get this whole &lt;strong&gt;Model View View-Model pattern&lt;/strong&gt; locked down and I think I might have it. This weekend I am going to try to go on a Video screencast extravaganza and record as much as I can about &lt;strong&gt;making Silverlight do freakin' backflips&lt;/strong&gt; with the MVVM pattern.&amp;nbsp; I will be filing these bad asses under the &lt;strong&gt;Silver Tips&lt;/strong&gt; title, so search &lt;strong&gt;Silver Tips&lt;/strong&gt; on my site to get at these.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; What was kicking my ass for days was how to implement a Command behavior within Silverlight that mimics the command behavior within WPF. I had looked at &lt;a href="http://nikhilk.net/silverlight-behaviors.aspx"&gt;Nikhil's Post on this&lt;/a&gt; and thought that it was valuable, but it wasn't a complete implementation. Then I found a gem from a codeplex project released last month, &lt;a href="http://www.codeplex.com/slextenions"&gt;SL Extensions&lt;/a&gt;, that had an entire command service already in place. The way I see it, with the Silverlight toolkit out, and now these extensions, I don't need to go nuts writing my own framework.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; The plan looks like this (from 50,000 ft, and it is windy up here, things might change):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1. Hello world with this MVVM junk. (First Post is up! go check it out: &lt;a href="http://www.ryankeeter.com/silverlight/silverlight-mvvm-pt-1-hello-world-style/"&gt;http://www.ryankeeter.com/silverlight/silverlight-mvvm-pt-1-hello-world-style/&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;2. Implementing a regular asynchronous callback structure, and then implementing it with the command pattern.&lt;/p&gt;
&lt;p&gt;3. Implementing Unit Testing within Silverlight&lt;/p&gt;
&lt;p&gt;3. Small Demo app { Pulling data from a service and displaying it using this pattern, with tests }&lt;/p&gt;
&lt;p&gt;4. Small Demo app { Pulling data and traversing through a set of pages }&lt;/p&gt;
&lt;p&gt;5. Pulling data through a feed and rockin' out with our * out&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp; The list will grow and I will start to add to it as I keep going, but this is basically it. I am going to follow a post/screencast type of scenario with this, so you can read and view the code, then watch a video on the whole thing unfolding...that sounds like a good plan.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; If there is anything that you want to see, then hit me up and I'll do my best to get into it! And of course, make sure you &lt;a href="http://feeds.feedburner.com/ryankeeter"&gt;grab the RSS feed&lt;/a&gt; so that you can keep up to date on the breaking changes.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;w00t! I love this Silverlight shit!&lt;/p&gt;
&lt;p&gt;Ryan&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ryankeeter/~4/XNcFPa_WPI4" height="1" width="1"/&gt;</description><author>RyanKeeter - A Soldier in a Tie &lt;graffiti@yoursite.com&gt;</author><feedburner:origLink>http://www.ryankeeter.com/videos/silvertips/series-planned-through-hoops-with-silverlight-and-mvvm/</feedburner:origLink></item><item><title>How to Aggregate your Life into One Usable Feed Pipe</title><link>http://feedproxy.google.com/~r/ryankeeter/~3/j0SBvRCyaU8/</link><pubDate>Thu, 04 Dec 2008 04:54:00 GMT</pubDate><guid isPermaLink="false">http://www.ryankeeter.com/videos/screencasts/how-to-aggregate-your-life-into-one-usable-feed-pipe/</guid><dc:creator>The Admin</dc:creator><slash:comments>1</slash:comments><category domain="http://www.ryankeeter.com/videos/screencasts/">ScreenCasts</category><description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; Teach you how to take feeds from multiple sources and put them into one feed that you can consume anywhere.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt; Feeds from whatever matters to you (in this article it will be Twitter, blog, flickr and blip.tv), Yahoo! Pipes, and Facebook.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Time Needed:~&lt;/strong&gt; 10 minutes&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download movie from:&lt;/strong&gt; &lt;a href="http://vimeo.com/download/video:86502894?e=1228370055&amp;amp;h=00fccf96ff71738441f0128f68cd7a2c&amp;amp;uh=5866593b1af3e55610009bc5b6c990c7"&gt;The Vimeo show page &lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;embed width="600" height="410" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="http://vimeo.com/moogaloop.swf?clip_id=2422927&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff0000&amp;amp;fullscreen=1"&gt;&lt;/embed&gt;
&lt;p&gt;&lt;br /&gt;
&lt;a href="http://vimeo.com/2422927"&gt;How to Aggregate your Life into One Feed Pipe&lt;/a&gt; from &lt;a href="http://vimeo.com/user918773"&gt;ryankeeter&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ryankeeter/~4/j0SBvRCyaU8" height="1" width="1"/&gt;</description><author>RyanKeeter - A Soldier in a Tie &lt;graffiti@yoursite.com&gt;</author><feedburner:origLink>http://www.ryankeeter.com/videos/screencasts/how-to-aggregate-your-life-into-one-usable-feed-pipe/</feedburner:origLink></item><item><title>True Power of Photoshop Scripting: Actions</title><link>http://feedproxy.google.com/~r/ryankeeter/~3/0RY9mHSv5mE/</link><pubDate>Wed, 03 Dec 2008 04:47:00 GMT</pubDate><guid isPermaLink="false">http://www.ryankeeter.com/art/true-power-of-photoshop-scripting-actions/</guid><dc:creator>The Admin</dc:creator><slash:comments>1</slash:comments><category domain="http://www.ryankeeter.com/art/">art</category><description>&lt;div style="background-color: rgb(255, 249, 201);"&gt;
&lt;p style="padding: 5px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yesterday I wrote about some basic setup information to get started with Photoshop scripting, you can &lt;a target="_blank" href="http://www.ryankeeter.com/art/scripting-photoshop-with-javascript-hello-world-style/"&gt;check out that post here&lt;/a&gt;. I will be building off of that post to continue with the rest of this post; so lets get started!&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Many advanced programs such as the entire &lt;strong&gt;Microsoft Office&lt;/strong&gt; suite has the ability to record actions such as macros. These macros can be reran by performing certain events, such as on startup, on shutdown, or on some type of keyboard command being struck. This type of behavior is called an &lt;strong&gt;action &lt;/strong&gt;within Photoshop, and &lt;strong&gt;I believe &lt;/strong&gt;that the &lt;strong&gt;true power of Photoshop scripting is to call these actions from code&lt;/strong&gt;. When you create these actions, you can have them do anything in a recorded sequence, and calling them from a script is puuurrdy powerful. The next portion will talk about these actions really quick, but if you know all about them, then scroll down to the scripting portion.&lt;/p&gt;
&lt;h3&gt;Creating a New Action Within an Action Set&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/TruePowerofPhotoshopScriptingActions_12B73/NewActionSet_2.png"&gt;&lt;img width="604" height="342" border="0" title="NewActionSet" style="border-width: 0px; display: inline;" alt="NewActionSet" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/TruePowerofPhotoshopScriptingActions_12B73/NewActionSet_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/TruePowerofPhotoshopScriptingActions_12B73/NewSetDialog_2.png"&gt;&lt;img width="604" height="181" border="0" title="NewSetDialog" style="border-width: 0px; display: inline;" alt="NewSetDialog" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/TruePowerofPhotoshopScriptingActions_12B73/NewSetDialog_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/TruePowerofPhotoshopScriptingActions_12B73/Actions_2.png"&gt;&lt;img width="604" height="404" border="0" title="Actions" style="border-width: 0px; display: inline;" alt="Actions" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/TruePowerofPhotoshopScriptingActions_12B73/Actions_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Calling the Recorded Action within a Script&lt;/h3&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; To get started here, lets look at the complete code from the previous post. This code can be ran from &lt;strong&gt;File &amp;gt;&amp;gt; Scripts &amp;gt;&amp;gt; {Name of the Script}&lt;/strong&gt;. Once again, this script will get access to the application and then create three new documents of varying sizes.&lt;/p&gt;
&lt;pre class="js" name="code"&gt;
//Set a variable holding the current preferences, because we will change
//them to our own needs
var startPreferences = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;

//Create a new document by using the global 'app' variable
var newFoo = app.documents.add(630,215,128,&amp;quot;Foo&amp;quot;);
newFoo = null;

var newSmallFoo = app.documents.add(70,113,128,&amp;quot;FooSmall&amp;quot;); newSmallFoo = null;

var newLongFoo = app.documents.add(218,60,128,&amp;quot;FooLong&amp;quot;);
newLongFoo = null;

var newScreencastFoo = app.documents.add(388, 250,128,&amp;quot;FooScreencast&amp;quot;);
newScreencastFoo = null;

//set the preferences back to what they were 
//before we adjusted them
app.preferences.rulerUnits = startPreferences;
 //This is the variable we defined earlier

&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The next step will be to get load the action set into the &lt;strong&gt;Actions Palette. &lt;/strong&gt;The code to do this is straight forward, calling the load method on the app global object and passing it a new File object that is a just a string representation of absolute path to the &lt;strong&gt;.ATN&lt;/strong&gt; file.&lt;/p&gt;
&lt;pre class="js" name="code"&gt;
app.load(new File(app.path.toString() + &amp;quot;/Presets/Photoshop Actions/RyanKeeter.atn&amp;quot;));&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The final step will be to run an action within a set that we just loaded. The method to call this is &lt;strong&gt;&amp;ldquo;doAction,&amp;rdquo; &lt;/strong&gt;and the parameters are two strings, the name of the action and then the name of the action set. I will show the action set that I will be using to call methods on:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/TruePowerofPhotoshopScriptingActions_12B73/ActionsPalette_6.png"&gt;&lt;img width="604" height="504" border="0" title="ActionsPalette" style="border-width: 0px; display: inline;" alt="ActionsPalette" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/TruePowerofPhotoshopScriptingActions_12B73/ActionsPalette_thumb_2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Below is what this call looks like:&lt;/p&gt;
&lt;pre class="js" name="code"&gt;
//The parameters are the name of the action, and then
//the action set they belong to
app.doAction('Foo Action','RyanKeeter');
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp; REMEMBER: the action will be conducted upon the current document that has focus.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; My example and current need is simple, but you could expand it to whatever you like. My need is to create three documents of specific sizes, and then stripe some color across the documents that is common across my whole site, so lets see the entire code and then the video performing this script:&lt;/p&gt;
&lt;pre class="js" name="code"&gt;
var startPreferences = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;

//Load the *.atn files, or the action files
app.load(new File(app.path.toString() + &amp;quot;/Presets/Photoshop Actions/RyanKeeter.atn&amp;quot;));

var newFoo = app.documents.add(630,215,128,&amp;quot;Foo&amp;quot;);
newFoo = null;

//Now that the action files are loaded, letssetup our Foo file
app.doAction('Foo Action','RyanKeeter');

var newSmallFoo = app.documents.add(70,113,128,&amp;quot;FooSmall&amp;quot;); newSmallFoo = null;

//Lets setup our Small Foo file
app.doAction('Foo Small','RyanKeeter');

var newLongFoo = app.documents.add(218,60,128,&amp;quot;FooLong&amp;quot;);
newLongFoo = null;

//Lets stup out Long foo file
app.doAction('Foo Long','RyanKeeter');

var newScreencastFoo = app.documents.add(388, 250,128,&amp;quot;FooScreencast&amp;quot;);
newScreencastFoo = null;

//Finally, lets setup our screenCast foo file
app.doAction('Foo Screencast','RyanKeeter');

app.preferences.rulerUnits = startPreferences; 
//This is the variable we defined earlier

&lt;/pre&gt;
&lt;p&gt;Rockin, here is a vid of this all happening, hope this all helps you as much as it helps me!&lt;/p&gt;
&lt;object width="600" height="481"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2416885&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff0000&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=2416885&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ff0000&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="600" height="481"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;p&gt;&lt;br /&gt;
&lt;a href="http://vimeo.com/2416885"&gt;Untitled&lt;/a&gt; from &lt;a href="http://vimeo.com/user918773"&gt;ryankeeter&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Rock on.&lt;/p&gt;
&lt;p&gt;Ryan.&lt;/p&gt;

&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.ryankeeter.com%2fart%2ftrue-power-of-photoshop-scripting-actions%2f"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.ryankeeter.com%2fart%2ftrue-power-of-photoshop-scripting-actions%2f&amp;bgcolor=ff0000&amp;cbgcolor=d4d4d4" border="0" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/ryankeeter/~4/0RY9mHSv5mE" height="1" width="1"/&gt;</description><author>RyanKeeter - A Soldier in a Tie &lt;graffiti@yoursite.com&gt;</author><feedburner:origLink>http://www.ryankeeter.com/art/true-power-of-photoshop-scripting-actions/</feedburner:origLink></item><item><title>Scripting Photoshop with JavaScript : Hello World Style</title><link>http://feedproxy.google.com/~r/ryankeeter/~3/7m9Oa8XECic/</link><pubDate>Tue, 02 Dec 2008 06:23:00 GMT</pubDate><guid isPermaLink="false">http://www.ryankeeter.com/art/scripting-photoshop-with-javascript-hello-world-style/</guid><dc:creator>The Admin</dc:creator><slash:comments>0</slash:comments><category domain="http://www.ryankeeter.com/art/">art</category><description>&lt;p&gt;&amp;nbsp;&amp;nbsp; Who would have thought that it was possible to script Photoshop with such a language like &lt;strong&gt;JavaScript&lt;/strong&gt;. One would think that it would be some&lt;strong&gt; proprietary language&lt;/strong&gt;, or at the very least, Action script, which is a JavaScript type of language. Alas, &lt;strong&gt;JavaScript is the language of choice&lt;/strong&gt; here and I won&amp;rsquo;t argue it as JavaScript is after all the assembly language of the web.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; So how does it all work anyways, and why would one use it? I for one, need to create &lt;strong&gt;three different blog images for each post&lt;/strong&gt;, and creating each one of those documents is highly annoying, so scripting it is the natural choice. Where is the entry point then for this, how does one start? First off, you need two things, one woudl be a notepad type of editor, and the second would be Photoshop (duh), so lets get started:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;strong&gt;Quick Questions&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Q. Where are the scripts stored?&lt;/p&gt;
&lt;p&gt;A. They are stored at (Winders) C:\Program Files\{Your version of Photoshop, mine is CS2}\Presets\Scripts&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/ScriptingPhotoshopwithJavaScriptHelloWor_13A6B/image_2.png"&gt;&lt;img width="604" height="454" border="0" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/ScriptingPhotoshopwithJavaScriptHelloWor_13A6B/image_thumb.png" alt="image" style="border-width: 0px; display: inline;" title="image" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q. What file type are they?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A.&lt;/strong&gt; They are JSX (the &amp;lsquo;X&amp;rsquo; makes them, cool, that is why they added it =&amp;gt; the evangelists told me so)&lt;a href="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/ScriptingPhotoshopwithJavaScriptHelloWor_13A6B/script-icon-128_2.png"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q. Does it have to follow some convention, a type of API?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A.&lt;/strong&gt; Yes, it does, but for the most part it is object oriented and all the objects are static in nature so you can just call &lt;font face="consola"&gt;&lt;strong&gt;api.foo &lt;/strong&gt;whenever you want.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q. Can we get started Already (*cough* code please)?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A.&lt;/strong&gt; Of course!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; For our example we need to create three documents, so lets do that by first defining our type of unit measurement, which will be pixels:&lt;/p&gt;
&lt;pre name="code" class="jscript"&gt;
var startMonkey = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; What we have done above is take the default unit measurements that is stored in our preferences and we put them in a variable called &lt;strong&gt;&amp;ldquo;startMonkey.&amp;rdquo; &lt;/strong&gt;Next, we will create and open our new documents:&lt;/p&gt;
&lt;pre name="code" class="javascript"&gt;
var newFoo = app.documents.add(630,215,128,&amp;quot;Foo&amp;quot;);
newFoo = null;

var newSmallFoo = app.documents.add(70,113,128,&amp;quot;FooSmall&amp;quot;); newSmallFoo = null;

var newLongFoo = app.documents.add(218,60,128,&amp;quot;FooLong&amp;quot;);
newLongFoo = null;

var newScreencastFoo = app.documents.add(388, 250,128,&amp;quot;FooScreencast&amp;quot;);
newScreencastFoo = null;
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; What we did above is define three documents, added them to the current application by calling &amp;ldquo;&lt;strong&gt;&lt;font face="consol"&gt;app.documents.add&lt;/font&gt;&lt;/strong&gt;&amp;rdquo; and passing in parameters of width, height, pixel ratio, and document name.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Now lets put the default ruler measurement back at the end of the document:&lt;/p&gt;
&lt;pre name="code" class="javascript"&gt;
app.preferences.rulerUnits = startMonkey;
 //This is the variable we defined earlier
&lt;/pre&gt;
&lt;p&gt;When we run this we are presented with exactly what we were looking for:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To&amp;nbsp; RUN this SCRIPT&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. File &amp;gt;&amp;gt; Script &amp;gt;&amp;gt; {Name of the script}&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/ScriptingPhotoshopwithJavaScriptHelloWor_13A6B/ScriptAccessPhotoshop_2.jpg"&gt;&lt;img width="604" height="404" border="0" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/ScriptingPhotoshopwithJavaScriptHelloWor_13A6B/ScriptAccessPhotoshop_thumb.jpg" alt="ScriptAccessPhotoshop" style="border: 0px none ; display: inline;" title="ScriptAccessPhotoshop" /&gt;&lt;/a&gt; &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Done.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/ScriptingPhotoshopwithJavaScriptHelloWor_13A6B/ScriptAccessPhotoshop'_2.png"&gt;&lt;img width="604" height="392" border="0" src="http://www.ryankeeter.com/files/media/image/WindowsLiveWriter/ScriptingPhotoshopwithJavaScriptHelloWor_13A6B/ScriptAccessPhotoshop'_thumb.png" alt="ScriptAccessPhotoshop'" style="border: 0px none ; display: inline;" title="ScriptAccessPhotoshop'" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Sweet, the script works and I never have to refer to my notebook again to get the sizes of those images (why did I even make them so screwed up?). In the next portion, we are going to extend this example to run some custom actions in JavaScript and talk about what actions are (think Macros for Photoshop).w00t!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ryankeeter/~4/7m9Oa8XECic" height="1" width="1"/&gt;</description><author>RyanKeeter - A Soldier in a Tie &lt;graffiti@yoursite.com&gt;</author><feedburner:origLink>http://www.ryankeeter.com/art/scripting-photoshop-with-javascript-hello-world-style/</feedburner:origLink></item></channel></rss>
