We love Microsoft’s Entity Framework and the MVC framework. Put together, they make development a lot easier because they take care of a lot of the heavy lifting. As a bonus, they help make applications more structured, more easily testable and more fun to work on. Below are some steps for setting up a Code First entity framework MVC4 project in Visual Studio:
1. Define the model
2. Create the DBcontext
3. Add a connection string
4. Add a data initializer
5. Set the initializer in global.asax.cs
6. Add the DBcontext object to a view order to test
As with all technologies, it takes a while to get comfortable with how to apply these steps in an accurate manner. This is in part because most tutorials focus on the details. They explain how to use a given technology, pattern or framework, however it is often hard to find a practical ‘use case’.
To create a file system Website
1. Open Microsoft Visual Studio 2010 or Microsoft Visual Web Developer Express.
2. On the File menu, click New WebSite.
3. Under Installed Templates, click Visual Basic or C# and then select ASP.NET Web Site.
4. In the Web Location box, select File System, and then enter the name of the folder where you want to keep the pages of your Web site.
5. Click OK.
Here is a link to some free ASP.NET templates
The introduction of the bitcoin, a digital currency may change the way the chips fall! Bitcoin is an innovative payment network and a new kind of money. Last week, The D Las Vegas Casino Hotel and the Golden Gate Hotel & Casino will begin collecting the digital currency that merchants increasingly are starting to accept. The two downtown Vegas properties, which share an owner, will accept the currency at five locations, including their front desks and the D’s Gift Shop. Guests also can use the currency at the D Hotel’s American Coney Island hot dog shop and Joe Vicari’s Andiamo Italian Steakhouse.
Bitcoin uses peer-to-peer technology to operate with no central authority or banks; managing transactions and the issuing of bitcoins is carried out collectively by the network. Bitcoin is open-source; its design is public, nobody owns or controls Bitcoin and everyone can take part. Through many of its unique properties, Bitcoin allows exciting uses that could not be covered by any previous payment system.
The Bitcoin purchases will be processed through BitPay, which allows merchants to accept Bitcoins just as they would Visa, MasterCard or Paypal. Bitpay offers an easy bitcoin shopping solution. Bitcoin has been around for years, but it is slowly gaining traction among mainstream merchants. Last week, online discount retailer Overstock.com began accepting Bitcoins. Will this be the end of cash and chips?
I am going to my grave thinking that Google sees and knows everything about me! Maybe I am paranoid, but anyway, this new project is really cool! Google[x] has announced new project: smart contact lenses that can detect glucose levels via the wearer’s tears and alert them when levels dip or rise. Cool huh?
According to project co-founders Brian Otis and Babak Parviz in a blog post, “It’s still early days for this technology, but we’ve completed multiple clinical research studies which are helping to refine our prototype. We hope this could someday lead to a new way for people with diabetes to manage their disease,” The lens works via a small wireless chip and glucose sensor embedded between two pieces of soft material. The current prototype puts out a reading once a second. Google is also interested in integrating an LED light, which could light up to alert the wearer of dangerous glucose levels.
I told you it was cool…beat that Apple, Facebook…whoever! Good ol’ Google giving back to the community they know all about. 🙂
Forget horsepower. The connected car is becoming the hottest model on dealer lots. In-vehicle technology is the top selling point for 39 percent of car buyers today. This is more than twice the 14 percent who say their first consideration is traditional performance measures such as power and speed, according to a study that consulting firm Accenture released in December. That’s why cars that talk, show drivers the way and steer them from harm will cover the floor of next week’s Detroit auto show.
Automakers at the show will be looking to push beyond what’s on the road today such as Tesla Motors Inc. (TSLA)’s Model S, with a large tablet computer on its dashboard that runs a jumbo-sized version of Google Maps for navigation, and Ford Motor Co. (F)’s Sync system, which the company credits for attracting customers even as it’s been criticized for imperfections.
At the North American International Auto Show in Detroit next week, General Motors Co. (GM) will tout its 4G LTE-connected Chevys while Ford introduces more applications that work with its voice-activated Sync system, including those that allow drivers to activate a home security system from the car.
Consumer Electronics Show 2014 Wows, With Driver-less Cars and Curved TVs
There were 5 hot trends at the 2014 CES (Consumer Electronics Show). CES is the annual technology show that exhibits the latest and greatest that the digital future holds. Here are the two mind-blowing things that caught my attention!
1) Curved TV:
Flat-screens now bend and curve to the user’s will. TV makers, including Samsung and LG, rolled out massive high-definition TVs featuring a curved screen. In some cases, the TV screen bends with the touch of a button, giving users the option to watch programs with a flat or curved display.
The latest tech fest featured demonstrations of “autonomous cars” that take over the driving. BMW and Audi unveiled their latest driver-less car technology and conducted demonstration drives. Nevada is one of a few states where it’s legal to test drive autonomous cars, though it requires a person to sit in the driver’s seat at all times.
70 million customers that shop at Target had their personal information stolen in a data breach the retailer said Friday January 6, 2014. Are you scared…I am! I shop at Target and 70 million is a BIG number! The stolen data includes names, mailing addresses, phone numbers or email addresses. Along with the encrypted PIN data, Target said a few months ago that data thieves stole customer names, credit and debit card numbers, card expiration dates and the embedded code on the magnetic strip on the back of cards used at Target between Nov. 27 and Dec. 15. Ok, I am definitely worried… I AM one of the people in that 70 million, what the hell does that mean? Was your data stolen?
The most recent announcement comes along with an unsuccessful holiday season for Target. Target is expecting a comparable store sales decline of 2.5%. They predicted that sales would be flat. Target also revealed at the end of December that 0.1% of gift cards sold during the holidays weren’t fully activated. Although they promised to honor the faulty cards, I think the damage has been done…snafu!
In addition, Target will close eight stores in May. The stores are in West Dundee, Ill.; Las Vegas, Nev.; North Las Vegas, Nev.; Duluth, Ga.; Memphis, Tenn.; Orange Park, Fla.; Middletown, Ohio; and Trotwood, Ohio. Needless to say it is not Target’s day!
You’re a .Net developer. You’ve worked with MS SQL Server, PostgreSQL and MySQL databases on more than a few projects. You feel pretty good about your abilities, right? Now, enter an opportunity to work with Oracle.
Oracle shouldn’t be too bad, right? How different could it be? To the inexperienced, one might think that there really is no difference at all. However, depending on the client and the level of security desired it could be vastly different.
Before you begin re-evaluating your life choices, remember it’s only technology and it can be conquered and we will show you the three easy steps you need to take! Read more here…
The lawsuit between Oracle and Google over the use of Java in Android is in the books. Oracle scored some points and prevailed on at least one narrow point of the dispute, as time has run out, the scoreboard is lopsided in Google’s favor.
Google infringes on Oracle’s copyrights to Java
Asked to decide whether Google had infringed upon Oracle’s copyrights to certain parts of the Java programming language, the jury agreed that it had. But then, when asked to decide on four specific examples of that infringement, jurors could agree on only one: The rangeCheck method in TimSort.java and ComparableTimSort.java. Don’t ask me to explain exactly what it is, but it is being described widely as “nine lines of code.” And, unfortunately for Oracle, the damages it can collect are limited to somewhere in the neighborhood of $150,000 to $200,000, or less than pocket change for either company, not the $1 billion or more Oracle had said it wanted.
Oracle CEO Larry Ellison testified along with Google CEO Larry Page
Initially billed as the “World Series of intellectual property cases,” this trial had lots of bold-faced names on the witness stand, including Oracle CEO Larry Ellison, Google CEO Larry Page, plus Scott McNealy and Jonathan Schwartz, both former.
Google allegedly copied 37 of Oracle’s Java APIs
Oracle’s lawsuit, filed two years ago, accused Google of violating Java patents and copyrights in its Android operating system. The main issue at trial was whether Google had copied 37 of Oracle’s Java APIs (application programming interfaces) in its Android OS. But the judge ruled in May that the APIs were not eligible for copyright protection under U.S. law. Meanwhile, the jury found that Google had not infringed Oracle’s patents. The Federal Circuit, which specializes in patent law, is hearing the case because Oracle also had claimed patent infringement. Oracle isn’t appealing the jury loss on that issue. A decision on the copyright claims isn’t expected for several months.
According to Department of Commerce, tech gadgets will provide the lion’s share of gifts purchased during the holidays. The department puts U.S. computer and device purchases in 2013 at $57.2 billion, up from $49 billion in 2012. So what the heck are people buying with this 12% increase?
Well, we know that the new iPhone 5s will be a big seller this year and according to USA Today, “The AT&T store near you isn’t waiting for next week’s holiday to slash the price of the rarely, if ever, discounted iPhone 5s.” Do the words slash and AT&T even belong in the same sentence? I am excited to see how this one plays out! Hopefully the lines will not be around the block like when the iPhone 5s was released! I know about these lines…I was one of the freaks standing in line days after the release, due to a malfunction in my old phone…ugh!!
BTW, the No. 1 rival to iPhone in the United States, the Samsung Galaxy S4 smartphone will be discounted at Staples for a penny with a two-year contract with AT&T. Always a catch with good ol’ AT&T. Wait a minute, didn’t Apple just win a billion dollar settlement against Samsung for patent infringement? Who cares I guess, it’s Black Friday people! You can even set up smartphone alerts at Blackfriday.com and bfads.net to get the latest news on discounted items.
TV’s will be another hot ticket item for Black Friday. Best Buy is offering a 55-inch LG TV for just $499. The regular price is $1,100. Wal-Mart has a 60-inch Vizio for $688, down from the usually priced $988. Both TVs will be in limited supply and only the true diehards will get the limited supply available, more lines to wait in!
What about online shopping? Looks like some of the deals have already been posted, but some retailers are waiting for next week to share the savings. Don’t worry they will get you with the shipping. Those lines are starting to look good…just kidding!
So whether you are an online shopping junkie or a line-waiting aficionado, let the games begin! Black Friday only comes once a yay, so gear up people!
We already know the popularity of the .Net framework in the enterprise application space, but does .Net have any cache in the world of pop culture?
I decided to do a quick study to see if the .Net framework was penetrating our favorite media outlets like Miley Cyrus, Bethenny, Wendy Williams, Fox News, NPR, NBC etc. And yes, Miley Cyrus has become her own media outlet! Let’s be clear, I may be the Development Diva, but I like my pop culture and I love the gossip! BTW, I hear plenty of internal gossip about MVC, .Net, Java, etc., what a bug kill! For this very scientific endeavor, I started with my BFF Stack Overflow. This is where I found the lovely tool Builtwith. This is an awesome Website dedicated to detecting specific frameworks, email services, analytics, tracking tools, and literally a host (Amazon) of other information – Check it out!
Back to my crude research project. Some of this I had to guess at because all of the information was not provided, so bare with me. If you see a question mark, know that I might be talking out of my a**. Feel free to chime in because these URLs are giving me NOTHING!!!! Some of these folks must be hiding something because I got a lot of NOTHING in the weirdest places. Others, I know from reading articles in these same publications…so, let’s do this!
I decided to look at the server, framework, hosting, and name server. Why you might ask? So I can give you guys clues to help me uncover the mystery, duh!! So here is what I came up with:
|Bethenny||Apache||PHP and Flash||Amazon||GoDaddy|
|Bloomberg||Apache, Sun ONE, Sun Java||.Net||NOTHING||Verisign, UltraDNS neustar|
|Builwith||Amazon Route 53||PHP and .Net||Amazon?||Amazon|
|Cspan||IIS and IIS7||.Net and Flash||NOTHING||NOTHING|
|Fox News||Apache||NOTHING||nLayer, NTT America, Akamai||Akamai DNS|
|Amazon||Symantec||PHP||Self 😉||UltraDNS neustar, Dyn DNS|
|Huffington Post||Apache||NOTHING||NOTHING||AOL DNS and UltraDNS|
|Miley Cyrus||Ruby on Rails, PHP||CenturyLink||UltraDNS neustar, GE DNS|
|NPR||Apache||PHP and .Net||NOTHING||Savvis DNS|
|TechCrunch||nginx||PHP and Shockwave Flash Embeded||WordPress, ServerBeach, Layered Tech||WordPress DNS|
As expected the clear winner is PHP, however there were some surprises. .Net is clearly getting some traction in the pop culture world! Flash is not the hotty it used to be and I was happy to see at least one Ruby on Rails site. I expected Amazon to dominate the hosting market and also was surprised that GoDaddy with all those commercials was not a strong contender. Overall looks like most of the newbies and the good ole boys are using Apache servers, aaaahhhh peace has been restored! So help me with the NOTHINGs and correct my mistakes. Remember all scientific endeavors need testing!!!
When talking about Enterprise and Enterprise Level applications, I think of the software that has following features apart from the functionality it provides:
A. performance and rapid development
B. extensibility (i.e. its ability to interact and communicate with other software systems using industry standards)
C. scalability and supports high availability
D. reliability and security
1. Since PHP is a loosely typed and interpreted programming language, it does not have a same speed as that of compiled languages. So if speed and performance is your concern PHP might not be a good option.
2. For the enterprises that use Microsoft technology stack, using PHP as the programming language is difficult to work on especially if you wanted to access system level functionality. So platform integration could be the issue if you have to perform extensive integration with Windows OS.
3. With other languages and frameworks, like C# and Java, you can target Desktop, Mobile and Web using the same programming language. However, with PHP you are limited to web.
4. PHP has a reputation of being an insecure programming language and has long history of security issues.
Having mentioned all the downsides about PHP, you can still find it being used in building enterprise applications, banking applications, and others but the use cases are very few compared to other programming languages.
Compatibility issues are a huge problem for software developers. We are constantly checking and rechecking work to make sure that everything goes right and nothing hurts us down to our core more than when our customers want something that will run as smoothly on IE 7 as it does on today’s browsers.
Most clients don’t understand the difference or refuse to upgrade or can’t upgrade… and that’s where the problems always start. Most developers I have met have a common distaste for Internet Explorer. When browsers like Chrome, Safari and Firefox came out we all found out just how much compatibility issues would plague us for years to come.
Now, things have SLOWLY improved, especially with the current run of browsers including IE 10 (which is only available for users who have Windows 8). But these issues still arise more often than we’d like.
I have come across one particular issue a lot, and I always seem to forget about it when I start building a new project.
Internet Explorer has a cache issue when it comes to jQuery Ajax calls. What this means is that when an jQuery Ajax call is made in Internet Explorer it has to be unique or the browser won’t allow the Ajax request. None of the other major browsers have this issue. Usually the problem starts with the phrase: “Hey I found this weird thing in IE”. I start my usual debugging techniques of going through and figuring out when and where the code is breaking, I scratch my head, drink some coffee, stare confusedly at my screen before eventually planning to go play in the middle of a busy intersection… at night… wearing black… Then I remember the caching issue… and it’s simple fix.
There it is, problem solved. What this line does is add an arbitrary time-stamp to every Ajax request making it (in IE’s programming) a different, unique request.
As a front-end web developer these days it is vital to possess a very robust skill set to be effective in the market place, and to pull your weight on a team. A lot of people think that the User Interaction and User Experience (UI and UX respectively) stuff is just making things look pretty and therefore, is not as complex as the server side of things. This could also lead someone to the conclusion that if it is not as complex as the back-end then it must not be a vital to a project. In some projects that may be the case, but it really comes down to how much “Company X” has invested in the project and what the return on that project needs to be.
Often the front-end comes in at the latest stage in development so these key people need to know how to trouble shoot issues to iron out the wrinkles and get it ready for “shipping.” Designing the UI and UX for a product whether it is a website, camera, chair, or ballet is a job that requires real understanding of the target User and the desired result. Making a product that is both intuitive and robust is a very complicated undertaking and requires much planning and experimentation. Sometimes taking something that has been created on the back-end and making it function and interact naturally with the User can be a back-and-forth process of try, fail, and succeed until finally it works. It’s about getting creative and breaking barriers to introduce new, fun, and interactive experiences for the User. A good web designer will be there from the beginning to the end of the project; planning and drawing up mock-ups, making sure the design is set in motion, getting their hands dirty and coding, and cleaning up any trouble that will naturally come along with any project. In other words they are like the Marines, “First ones in and last ones out!” Well maybe not that drastic or dangerous but the point is there.
My brother and I had a sure fire way of getting out of things as children.
Whenever our dad would assigned us a task, we would simply do it the “wrong way”. He would take over and we could continue playing HeMan or Inspector Gadget or whatever game we wanted to play instead of mowing the lawn.
As I’ve gotten older, I realized that there was a reason my father wanted us to do things his way. It got the work done in a timely manner. If we had just stopped screwing around, we could’ve helped out our dad and still had time to reenact awesome 80s/90s cartoons.
Now, whenever I’m given a task to complete, I realize that there is already someone, somewhere who has come across a similar problem and created an eloquent solution that I can adapt to my situation.
I was recently given the task of taking a client’s CSV (comma separated value) file and importing it into a database through a .NET application. I had done this before and knew that I could do it based on the index of the column (i.e. column 1 matched up with the property Name).
But this seemed really inefficient to me, what happened if the columns changed, or the order was rearranged… the whole method would have to be rewritten and retested.
So, I set out in an effort to find a way to import a CSV file with column recognition.
And there I found CsvHelper. This is a C# library from developer Josh Close on github that allows a simple way for you to take a CSV file, read it and map it to column headings to import it into a pre-defined class in your project and subsequently your database.
It’s not perfect (nothing in programming ever is).
If a column doesn’t exist or if the column header is capitalized in an odd way, or not at all, the mapping won’t work.
But for the most part it is a unique and innovative tool. And reduced my time spent from a full day (including documentation so future developers could tell what column mapped to what property) to a couple of hours.
Now, I have time to watch Care Bears and Darkwing Duck with my kids instead of working late into the night.
One of the coolest parts about any futuristic movies is always the computers that the writers and producers come up with.
They have cool things like touch screens and 3D displays and interactive voices that will talk to you… Wait… wait just a second… we have all that. We have all that right now with our smart phones, we are living in a time that was created through science fiction.
One of my favorite ideas was a computer that you could talk to and it would talk back, it fascinated me. When Siri came out for the iPhone, I knew we were one step closer to Majel Barrett (the actress who played most of the computer voices in Star Trek).
But the fact is that programmers have had this kind of capability for many years.
In the .NET framework there is a feature called Speech Synthesizer.
Options are limited but you can select any of three (David, Hazel or Zira) default voices and have it read off strings of text to your user for basic instructions. There are a bevy of web sites that will allow you to install new voices and even ways to create your own, which is a time and labor intensive option, but possible.
Right now, these types of applications are used mostly for visually impaired users to help them get the same use out of applications. And recently they are used more and more for things like GPS navigation and in cars to try and help drivers prevent texting while behind the wheel.
Microsoft hasn’t advanced the Speech Synthesizer much in the last three release versions of .NET but the potential is there.
Think about it: A fully automated, voice activated home.
Need to wake up in the morning? Easy, set an alarm and let your speakers wake you up in the morning with a friendly message. Dark in the house? Easy, simply say the phrase “Computer, lights”. A quick question about the current population of a city, a state, the country… all within voice range, anywhere in your house.
Of course, this is probably still years if not decades away from being a viable large scale idea. A fully integrated computer into a home will take years of programming and testing (no one wants their home CPU to fail and not be able to turn on a light or the A/C), but it’s coming.
When it comes to development in a team environment there are two methods that remain strong in the industry, Agile and Waterfall. These two pathways are very different financially and in approach. To go further into detail each approach should be explained how it correlates with time management, finances, and purpose.
One thing to note is that there are very rare instances where either method is used in its purest form. Likely there will be a merging of the two or evolved adaptations to meet needs of a particular company. Another important note is that while these two methods are different from each other, they can both be used to achieve the same goal.
Most development shops use some form of the Agile method which is typically a less formal way of achieving goals and allows for flexibility in a project. The client will have opportunities to change the scope of the project to a degree because of the amount of meetings typically involved. There are a few key players Product owner, Scrum Master (get certified then have people call you Master!), and Team members. The Product owner is responsible for communicating the idea for the project to the development team. This could be a business liaison from Company X that the development team would work with to ensure the product meets standards. The Scrum master is responsible for making sure the goals are being met in reasonable time frames and takes care of eliminating any obstacles along the way. The Scrum master might be a more experienced developer with strength in creatively solving problems to achieve the end goal or short goals (sprints). Team members are the people responsible for developing the products and hitting the goals or tasks given to them. These team members could be front-end developers, back-end developers, QA experts, solution architects, or any other skill set necessary for that particular product.
At one time the more dominant method considered to be the standard was the Waterfall method. This typically is a better solution for smaller products. The main difference here is in the amount of planning and meetings. The goal is to get as much information set in stone as possible so that there is little to no change in scope of the project. This method is good for planning the financial aspect of a project because all expectations are on the table from the beginning. This also makes it much less flexible, in other words – “Once you leave the station the train is not stopping until it reaches its destination.” Developers generally like this type of approach because it is unlikely to have any major changes in design or functionality. The planning stage may last a long time, but it can speed up development quite a bit based on full understanding of expectations.
What a lot of companies do these days is merge Agile and Waterfall. This can be beneficial for both Client and Company to maximize cost effectiveness and productivity. Setting expectations upfront with some wiggle room and holding meetings to discuss both short term and long term goals can get the project rolling before all planning is completed. For clients who want to add features as they think of them this is a great method to use if they have proper funding.