^ Main | February 2006 »
January 28, 2006
Free .Net Remoting?
Wow, I just came across this on 5 1/2's blog and must say"Uh oh!"
Apparently the folks at The Silent Group took it upon themselves to write a free .Net Remoting gateway called Fluorine. The name isn't catchy by any means but if it allows me to use Remoting with .Net for FREE...I can get over the name.
Once I get some time to test I'll let everyone know about my trials and trib's. In the meantime, feel free to test yourself.
Posted by John C. Bland II at 8:19 AM | Permalink | Comments (0) | TrackBacks (0)
January 26, 2006
Constructor Overload
OK…I thought method overloading was sweet but constructor overloading makes it even better. The whole idea is you can have a method with the same name more than once with a different set of arguments for each. There are rules to how one is selected based on the conversion abilities of the arguments though.
Let’s start out with method overloading. Take for instance these functions.
public void Test(int blah)
{
}
public void Test(long blah)
{
}
public void Test(decimal blah)
{
}
Ok. By calling
sbyte anSbyte = 10;
Test(anSbyte)
which method will be chosen? Well, Rule One states the compiler will find the method with the argument closest to the argument passed on the conversion path. An sbyte (which is what gets passed) converts to a short, int, long, float, and decimal. The compiler chooses the closest which in this case would be int.
Continue reading "Constructor Overload" »
Posted by John C. Bland II at 11:57 AM | Permalink | Comments (0) | TrackBacks (0)
Using Yahoo! Maps GeoCoding API in C#
Digital Colony has taken the Yahoo! Maps GeoCoding API into C# for all of our goodness.
Get it while it's hot!
Posted by John C. Bland II at 8:44 AM | Permalink | Comments (0) | TrackBacks (0)
What is a Singleton?
A Singleton is an OOP pattern which is pretty sweet for several situations. Take for instance you have a data class that pulls web service data (which is what I'll be doing when I finish this post). Well, you don't necessarily want all of your other classes to have to create a new instance of the data class, set the necessary parameters, then make the call. Instead, create a Singleton, do it once, and in your classes create a reference to the instance.
Continue reading "What is a Singleton?" »
Posted by John C. Bland II at 1:23 AM | Permalink | Comments (0) | TrackBacks (0)
January 25, 2006
Language Overload
Have you ever experienced language overload? I seemed to have it heavy tonight while coding. What is it? Oh...let me explain.
Language overload is doing this in ColdFusion:
ListGetAt(mylist, 0, "|")
Its language overload when you know it should be 1 instead of 0 but you do it because you have been coding in an ECMA language (AS, C#, JavaScript, etc) or similar.
That's a simple example/mistake but I found my self write ColdFusion code like this: Hmm...that doesn't quite look right but my mind wouldn't fully convert to ColdFusion tonight. Maybe I should've starting writing in cfscript. Have you multi-language developers ever experienced this? Posted by John C. Bland II at 3:08 AM | Permalink
| Comments (0)
| TrackBacks (0)
I did this a while back but revisited it for a Flash module I am creating for a client. So you know how I work…I HATE CODE IN THE .fla! If I don’t use a root hack I use an include (picked that up from Ron Haberle). I used to initialize a Controller class and that would handle all of my app code. Ron showed me how he uses an include file and I loved that even better. All of my fla’s have 1 line of code now: #include “myFLAname.as”. That just feels right to me. Enough about includes and my flow…how about some _root hacking?!? Peep the code below. Basically on the root (or in an include) put the first piece of code. The only thing you have to change is your class name. I conveniently named my Root.as and store it in a class folder (for this demo I called it myclass). Just replace (ctrl+f in Flash 8) myclass.Root with yourclass.ClassName and you’re done. Now scroll a little lower and you will see the my Root class. I put the _root hack stuff inside of a comment block for clarity. That way I know I don’t have to touch that stuff anymore. From the onLoad method I call init() which is where I start initializing my app. I owe the original code to JesterXL (aka Jesse Warden). This post is really to expose the process a little more by opening it up to my reader base as well. It is a very sweet concept and it felt GREAT to implement it tonight. Hope this helps… Continue reading "Jack the (_root) Hacker" » Posted by John C. Bland II at 1:43 AM | Permalink
| Comments (0)
| TrackBacks (0)
On the AZCFUG list we were talking about loading settings from a .ini file or a database, pros vs cons. Without going in-depth I chose to go with the .ini file for security reasons. Below is the email I sent to the CFUG. (look @ the code first) So, I did a lil’ something extra in my ini file. Continue reading "Using .ini Settings" » Posted by John C. Bland II at 1:51 AM | Permalink
| Comments (0)
| TrackBacks (0)
Ok. I started on my book and couldn’t help but to try something on my own. The first part of the book talked about console applications and a very in-depth look at programming in general (seriously…it is pretty thorough). We built a simple “hello world-ish” app first (so yes, this is my 2nd app) which did nothing but print to the console window some text. Whoop-di-doo! I instantly was hungry for more though. The next app was a simple calculator. You enter a number and it did some math on it blah blah blah. I took this time to briefly look over the code and branch into doing my own thing. So, in comes the Project Calculator. First off, Microsoft C# 2005 Express Edition is nothing short of phenominal. It is super slick and growing on me every time I type “{class}.” (where {class} is a class…duh). The overall flow of this IDE is superb and it opens SUPER fast, unlike Dreamweaver which is my normal IDE of choice for any code. So, what does the app do? Continue reading "1st C# App: Project Calculator" » Posted by John C. Bland II at 3:10 AM | Permalink
| Comments (0)
| TrackBacks (0)
Recently I had to do a set of DOA’s (data access objects) for a project using PHP. Well, I started noticing the sql was the exact same except for the table name. One of my biggest peeves is having to rewrite the same code over and over and over. So, I quickly broke everything out of the DOA classes and created a Base.php class which contained several functions. Initially, it just calls the initDB function to setup the connection and stores it in a class var. Now we are ready to query the db. The only function I was able to truly get 100% dynamic, for this app, was the get() which was merely a SELECT statement. The get() function was somewhat geared towards the app simply because it had a set WHERE statement but it can be easily changed to work as needed. Continue reading "Simple DOA with Base class" » Posted by John C. Bland II at 1:29 AM | Permalink
| Comments (0)
| TrackBacks (0)
A user group member asked how http://www.skyloftsmgmgrand.com/ was built so we, on the list, started discussing it briefly. In an attempt to help the member understand a little better I did an example file. It doesn’t do much but keep resizing/repositioning the background (bg) clip and make two other clips (representations of the logo and navigation for the example site) move accordingly. Initially I did one that simply resized the bg and had the clips follow then followed it up with the code to use tweening instead. Both are super short in terms of code but get the job done. You can download the files in the Resources -> Code Library section of FMUG.az’s site. Continue reading "Resizing Interface" » Posted by John C. Bland II at 1:09 AM | Permalink
| Comments (0)
| TrackBacks (0)
I will be speaking on Flash Remoting this coming Wednesday (1/25/2006) for FMUG.az. Come check me out. Hopefully the preso helps some people learn the ease of using Remoting without all of the hoopla involved. See you there! (Breeze is available too.) Posted by John C. Bland II at 1:00 AM | Permalink
| Comments (0)
| TrackBacks (0)
GET IT WHILE IT'S HOT! AMFPHP Official Site AMFPHP 1.0 finally hit the chopping block in December. I've been using a AMFPHP since around the time it came out and had major issues with it but loved the fact that I could still use, what to me is, the best method for database integration in Flash. The biggest problems I had were documentation (whole site dedicated to it now), debugging error messages (these have greatly improved), and datatypes (excellent expansion in 1.0). There is still a need for an ease of use tutorial, which I'll be doing soon for FMUG.az next week, to help the beginners learn the easy way to install and start using AMFPHP. All previous tutorials I have seen deal with installing on Apache (namely dedicated boxes) and make everything sound complicated. Well, it only takes 2 steps to install. If you have time come to the FMUG meeting or catch it on Breeze. I'll post more about AMFPHP as I use it. Posted by John C. Bland II at 7:33 AM | Permalink
| Comments (0)
| TrackBacks (0)
Those of you who know me may be wondering "Why does he have a C# book?" Better yet, "Why is he toying with C#?" The answer is simple....I want to learn it. Recently I built a desktop application (can't comment on it right now) and ran into several problems. If I knew C# I could have built custom DLL(s) (proxy/facade/whatever you wanna call'em) and interfaced with it/them instead of spending weeks trying to use Flash+Zinc (I'll post more about that experience l8r) which apparently was impossible for what I was trying to do (natively that is). So, I did some work for a friend and he insisted on doing something for me which turned out to be buying a book from Amazon.com. Since I was interested in learning a knew language anyway, I have direct access to who I see as a GREAT programmer (Cody Beckner), and a chance @ a free book...I chose "C# Primer Plus" by Klaus Michelsen. Cody said it was the go to book last year and should still be very much so relevant today I chose it. I only need to get my feet wet into general setup and syntax. The rest is like riding a bike since I already know how to code. Hopefully I'll be able to spit out some desktop apps with it as well. Obviously my first choice would be Flash+Zinc but whatever tool is best for the job will be used. Posted by John C. Bland II at 7:19 AM | Permalink
| Comments (0)
| TrackBacks (0)
Well, I attempted to blog with Fusetalk and I liked the look of it and the ease of use but there were several issues I had with it. I'm not going to bash their software because it is great work...it just doesn't fit me. So this is now home. :-) Grab some RSS, etc and look for some sweet posts coming soon. Posted by John C. Bland II at 7:09 AM | Permalink
| Comments (0)
| TrackBacks (0)
January 24, 2006
Jack the (_root) Hacker
January 23, 2006
Using .ini Settings
I obviously could make the method receive the ini file dynamically but for my purposes this is fine. There is added functionality here that checks to see if the setting is private or not. I wanted to keep all settings in the ini so there wasn’t a mixture of straight app scope settings ( application.settings.blah = eek) and ini settings.January 22, 2006
1st C# App: Project Calculator
Simple DOA with Base class
Resizing Interface
Me on Flash Remoting @ FMUG.az meeting
January 21, 2006
AMFPHP 1.0
C# Primer Plus - Klaus Michelsen
New Blog



