|
 Monday, September 10, 2007

Texting/SMS Your Mobile Phone From .NET (or any other technology)

This is mainly a post for myself so I can have all the resources in one area, but hopefully it helps someone else out too.

There are a few ways to send a Text Message to your phone. The most common way is to send an email to your mobile provider. Here's a list of some of the mobile providers:

T-Mobile: phonenumber@tmomail.net 
Virgin Mobile: phonenumber@vmobl.com 
Cingular: phonenumber@cingularme.com 
Sprint: phonenumber@messaging.sprintpcs.com 
Verizon: phonenumber@vtext.com 
Nextel: phonenumber@messaging.nextel.com 
Update: 2007-09-12 - I found more email domains for the text messaging sites. 
sms.3rivers.net, 3 River Wireless
mobile.mycingular.com,Cingular
messaging.nextel.com,Nextel
tmomail.net,T-Mobile
vtext.com,Verizon
paging.acswireless.com,ACS Wireles
message.alltel.com,Alltel
message.alltel.com, Alltel PCS
alphanow.net,AlphNow
paging.acswireless.com ,Ameritech
mobile.att.net,AT& T PCS
text.bell.ca,Bell Canada
wireless.bellsouth.com,Bell South
bellsouth.cl,Bellsouth
myboostmobile.com,Boost
mobile.celloneusa.com,CellularOne
sms.edgewireless.com,Edge Wireless
mymetropcs.com,Metro PCS
qwestmp.com,Qwest
messaging.sprintpcs.com ,Sprint PCS
vmobl.com,Virgin Mobile
Where phonenumber = your 10 digit phone number 

If you know your company is going to only use ______ carrier, then you can set it up in your system to automatically send emails to the carriers address as listed above.

BUT what if you don't know the carrier? There are other services out there -

TeleFlipTeleflip allows you to send a  text message to anyone that can accept a text message. The caveat here is they reserve the right to sell your email (the from email) and the destination email (the phone# to you which your sending a text message). This service works GREAT, and if you don't give a damn about letting your email and phone number get out into the wild world of SPAM, then this  is the service for  you.

How to use:

Send an email to phonenumber@teleflip.com 

where "phonenumber" is the destination phone number you want to text.

Then include a subject and body in the email and send away. The user will get the text very soon.

TeleFlip reserves the right to advertise in your text messages and reserves the right to keep and read all of your texts. So... be careful what you send. But then again, you should be careful anytime  you text something, especially when its business related.

TeleFlip was almost a "slam-dunk" for my applications until I realized they stored all source/destination addresses and reserved the right to sell them. Unfortunately, I think this is going to cost them a lot of business.

 

webservicexnet WebServiceX.NET

Web Service X provides a service that's called SendSMSWorld and SendSMSIndia. You can send a lot of messages through this web service. I've heard that it works, but I've never been able to get it working. I ran into a few issues and the support and contact areas of the site didn't even work. I received exceptions when I attempted to use them.

Hmmm.... Betsy... this sure doesn't sound like a place I can trust. Its a good place to keep an eye one just in case they fix everything and it becomes reliable.

Conclusion

I'm aware of a lot of other services out there that send text messages for you but it seems to me the best way to do it is through the carrier. Find the carrier name, and then allow the app to send it to the carrier address. That's going to be the most reliable method to get texting to work (IMO).

There are other sites out there that allow you to send text messages for free, but they are not web services that you can connect to - txt2day.com and textforfree.net are examples of these. You could use the WebRequest class in .NET (which I'll be writing about soon) and Fiddler to build an auto submission routine for you, but that's a royal pain in the arse if you ask me.

So use what works best, but for ease of use, try out the carrier method first.

#    Comments [1] |

Simulating Bandwidth in Web Applications

Many times during developing web applications you will need to simulate a users experience. Certain questions come up, such as:

  • Will this page load fast on a dial up connection?
  • What are the response times with my new AJAX functionality on a slow connection?
  • How long will it take the user to upload/download file xxx?
  • What happens when the connection is too slow?

Unfortunately its hard to simulate a users experience on 56k when you're running on a 100 megabit network. A lot of companies will simply just try to optimize their code for the worst possible scenario, whilst still being blind to what really happens on a connection that slow.

Fortunately there are ways to simulate a users slow connection.

[Note: I'm not getting any kickbacks from this company, its just a product that's helped me a TON.]

netlimiter-top-logo Net Limiter is one such product that helps us test these connection speeds. Net Limiter will allow you to select a product, such as Internet Explorer and limit it bandwidth usage. I can set it to 56k, so when I visit a web page (or a local development web server) it will only allow enough bits to pass through the wire to simulate a 56k connection.

Uses

I've used this to test web applications that utilize AJAX functions. I've used it to test uploads to my web site to see how long it would take. I've also used this to test Flash/ActionScript development.

You can also use this to test the speeds of your Silverlight Applications.

Here is a screen shot of the application in use. In the screen shot you can see the areas where you can limit the incoming or outgoing bandwidth. You can set a speed for either connection (incoming/outgoing) and you can limit one or the other.

nl2shot_limit

 

Conclusion

The question shouldn't be "why to test test network speed" but more or less "why would you NOT test your functional speed of your web application?" So before your users say your site is too slow, experience it yourself, first hand.

#    Comments [0] |
 Wednesday, June 20, 2007

.NET Scaffolding

Jeremy D. Miller has a great post on keeping source code where it belongs. The thought process behind this is that code should be where YOU would assume it would be. If its data access code, it should be in a project/namespace that is something like Data Access or DAL or Data or something that represents the lower layer of the architecture. If its the business rules/tasks the files should be in a project called Business Rules, or BLL, or Tasks, or something similar. It makes sense, just think about this -- if you walk into a business and are given a project that was created by another developer and you're getting a ADO.NET Exception, you'd expect to find the code Data Access code in a Data Access layer, NOT in the code behind. I should not have to hunt down where you put your data access code.

We're talking about basic separation of concerns. The thing is, many developers lack these concepts because they're under the assumption of "I can write this the correct way, and it will take me 2 weeks, or I can do it quickly and it will take me 2 days." This may not matter when the application is running for a few months, but when you are asked to change the data provider from SQL Server to Oracle, or remove the web service calls and replace them with RPC calls, you're going to find yourself in a world of hurt because you didn't set everything up correctly. At this point they have amounted a large amount of Technical Debt.

He also noted that a large number of people were now using Ruby On Rails (RoR) as their development platform and I won't deny that I also believe that Ruby/Rails is huge right now. Tons of shops are running RoR and even Martin Fowler said on Hansel Minutes that ThoughtWorks was doing about 40% (or more) of their business with Ruby. The key point Jeremy brought up is that "RoR forces web developers into a bit of a straight jacket, but that's a good thing in a way." I completely agree. RoR enforces a consistent source code tree layout which allows for developers to easily find there way around a project. "Developer A" can create a project with RoR and then "Developer B" can come along and take a look at it and be familiar with the code layout and structure. The RoR community has agreed that this is the basic way to organize a project and it seems to be working for them.

So what about .NET? Enter Tree Surgeon. Right now, its a stand alone application, but in its near future it should be implemented as a template in Visual Studio 2005/2008. So what is it? It's a application that will create that straight jacket that Jeremy spoke of. It gives the developer a basic set up of layers, unit tests, code coverage and build script. It builds the entire source code directory and allows you to build on top of it. The source code layout follows a white paper written by Mike Roberts. I've been using it for quite awhile and I'm one of the developers on the project. I recently updated the source to allow creation of Visual Studio 2005 projects. Please note, this is only on the source and has not been reflected on the production release. Download the source, run it and then choose a application name, and generate the project source directory tree. Open the solution file and your application is ready to go.

The best part is that its easy to integrate existing projects into this format. I've done it quite a few times to allow for easy integration into my clients CI environment.

If you have any requests for Tree Surgeon, please visit the Issue Tracker page and submit and issue.

Enjoy!

#    Comments [0] |
 Thursday, June 07, 2007

Teamprise Explorer Client vs. Visual Studio Team Explorer

Over the weekend I had the time to work with Teamprise Explorer and Visual Studio Team Explorer while working on an open source project that I'm a part of. This was the first time I've worked with Teamprise explorer and Visual Studio Team Explorer. Since Codeplex houses its source on Team Foundation Server (TFS) I was required to use one of these options. This is a little look into my experience.

First off let me start by saying that I'm a Subversion junkie. I keep all of my own personal source code in Subversion and I've helped many clients implement Subversion in my time. I'm an avid user of TortoiseSVN because of its ease of use within Windows Explorer. Working with TFS was very similar to that of Subversion but the terminology was different and in my opinion Teamprise was a little more difficult to use. I originally wanted to use the Visual Studio Plug-in but I didn't want to wait for the 246 MB file to download so I could install a plug-in. :\ Therefore, I went with Teamprise first. They will give you a free license to work with Codeplex if you're working on a project, so that was a win/win for me.

Teamprise Explorer Client will allow you to connect to a Team Foundation Server to access source code (its user interface reminds of me of WinCvs quite a bit, yet  a lot more polished than that of WinCvs). The only problem that I had with Teamprise is that when I went needed to edit the code I had to "Checkout for Edit". If I did this on the entire directory tree such as my "src" directory it would log everything in edit mode. Therefore, when I went to upload the changes the entire source tree was being uploaded. NO BUENO. I know that on average I like to see what I've edited (yes, I'm used to TortoiseSVN) in some type of explorer window. This didn't happen on Teamprise (maybe there is a way to see if a file has changed other than the Pending Changes window, if so, someone please let me know). In the end, I got frustrated, ended up clicking some button on Teamprise explorer and overwrote all my changes somehow. THAT SUCKS. I got frustrated and decided to download the plug-in and start working that way.

Visual Studio Team Explorer Plug-in was great. Its interface reminded me of the old days when I use to personally use Source Safe 6.0. The icons were similar and it was familiar ground. I think we may have a winner. After making my changes again I was able to easily see what changed through simple icon's changing colors and I checked everything in really easily. It was very seamless. The only downside to Visual Studio Team Explorer is the install process. First you have download an IMG file, then download an install an IMG extractor and then open the IMG, then install. Only then did I get the full Visual Studio Integration. Very nice.

One downside that I see is that the Express SKU's don't allow plug-ins so this kind of sucks for those guys. How can you have an open source hosting site that doesn't allow its users to easily get the source. Don't get me wrong, they can use Teamprise but they have to know there is a learning curve with that. I didn't have the patience for it this time around.

There is hope on the horizon though...

TortoiseSVN

CodePlex will be offering TortoiseSVN Support to Team Foundation Server. Therefore you will be able to use a tool such as TortoiseSVN to access Team Foundation Server. Supposedly this is to be released on or around June 18th of this month. In a nutshell there will be a bridge built between SVN Commands and TFS commands. I would assume this is a good place for the Adapter pattern to be put to work.

Hopefully this comes to fruition, I can see a lot of people possibly moving their projects to CodePlex if that's the case.

#    Comments [1] |
 Thursday, May 24, 2007

Blogs, Podcasts and Screencasts

UPDATE: I added the publications I also read at the bottom. :)

I've been asked what blogs I read, podcasts I listen to and screencasts I watch. So here's a comprehensive list for ya'll. :)

Blogs (in no particular order)

Then at times I'll browse the MSDN Blogs. Also note, these are what I call my "essential" blogs. I read these daily. I have about 30 other blogs that I read if I have time.

 

Podcasts (in no particular Order)

Other Podcasts I listen to when I can

Screencasts/Virtual Labs (in no particular order)

Publications

#    Comments [1] |
 Wednesday, May 09, 2007

New Version Notepad++

A new version of Notepad++ came out last week. I just got around to installing it and there are a few new features such as the enhancements made to the search/replace function. You can now search/replace through many different files through an improved interface and also search recursively.

There were some changes made to fix some bugs and a cool new feature that transforms all links that are typed into N++ to clickable links.

One of my favorite new features is the NppExec that allows you to run your own preconfigured scripts from within N++. Pretty cool. I wonder if you can run Powershell scripts from within there? Its worth checking out.

Also, if you have Aspell installed you can use it as a spell checker for Notepad++. I normally don't use Notepad++ for this but I can see its usefulness.

Links

Notepad++ Release Notes

64 Bit Version of the Shell integration (right click on any file and open it witn Notepad++).

Running Notepad++ from the command line (by typing "n" into the command prompt)

#    Comments [0] |
 Friday, April 27, 2007

Flash & 64bit Internet Explorer dont play well together

I run on a 64 bit Vista machine. It has two versions of Internet Explorer installed, a 32 bit and 64 bit. When surfing the web I would notice that sometimes flash ads would display, other times they would not and I'd be prompted to install the flash player. So, I would. BUT... the player would never install.

After finally getting tired of it, I looked into the issue some more. Apparently I thought I was always running the 64 bit version of Internet Explorer, but alas, I was not.

In my task bar, I have an IE Icon that I click on sometimes, and other times I'll fire it up through the command prompt by entering "iexplore".

That was the problem. My Task Bar icon was set to open the 32 bit version of IE, while when I typed "iexplore" into the command window the 64 bit version would run. That would explain why I'm not seeing flash files on my 64 bit version. 64 Bit IE is not supported by flash. Bummer dude.

 

My fix:

I created a shortcut called "ie" in the system32 directory that fires up the 32 bit version (if I need flash support). Which I do when I'm watching episodes of DNRTV.

 

 

#    Comments [0] |
 Saturday, March 10, 2007

Open Source .NET Wiki

I've been on the hunt for a good .NET wiki that was open source and I think I've finally found one. The folks over at ScrewTurn Software have developed ScrewTurn Wiki.

Its GPL'd, built on .NET 2.0, does not require SQL Server 2005, works in a medium trust enviroment (that means that you hosted types can use it!) and has many other features which are listed here. The only two things that you'll need are:

  1. IIS5 (or better) with .NET 2.0 installed.
  2. One write enabled directory in the root of the wiki

 

If you need to see it in action, check out the .NET Tiers website. The guys over at .NET Tiers are also using this for their site.

This is definately something that can come in handy in the corporate world when you don't have something like SharePoint installed (which offers built in Wiki support).

 

kick it on DotNetKicks.com
#    Comments [2] |