Monday, May 5, 2014

4 Benefits of Object-Relational Mapping (ORM)

Object-relational mapping, in the purest sense, is a programming technique that supports the conversion of incompatible types in object-oriented programming languages, specifically between a data store and programming objects. You can use an ORM framework to persist model objects to a relational database and retrieve them, and the ORM framework will take care of converting the data between the two otherwise incompatible states. Most ORM tools rely heavily on metadata about both the database and objects, so that the objects need to know nothing about the database and the database doesn't need to know anything about how the data is structured in the application. ORM provides a clean separation of concerns in a well-designed data application, and the database and application can each work with data in its native form.

TIP: Nicknames and acronyms used for "object-relational mapping" include ORM, OR/M, and O/R mapping. Although ORM seems to be the term most commonly used in the .NET world, you'll often see the others in books and articles. We'll stick with ORM, mostly because it is the easiest to type!

The key feature of ORM is the mapping it uses to bind an object to its data in the database. Mapping expresses how an object and its properties and behaviors are related to one or more tables and their fields in the database. An ORM uses this mapping information to manage the process of converting data between its database and object forms, and generating the SQL for a relational database to insert, update, and delete data in response to changes the application makes to data objects.

ORM performs the rather amazing task of managing the application's interactions with the database. Once you've used an ORM's tools to create mappings and objects for use in an application, those objects completely manage the application's data access needs. You won't have to write any other low-level data access code. Strictly speaking, you could still write low-level data access code to supplement the ORM data objects, but this adds a significant layer of complexity to an application that we've rarely found necessary when using a robust ORM tool. It is better to stick to one or the other and keep the application simpler and more maintainable.

There are a number of benefits to using an ORM for development of databased applications and here's four:

  1. Productivity: The data access code is usually a significant portion of a typical application, and the time needed to write that code can be a significant portion of the overall development schedule. When using an ORM tool, the amount of code is unlikely to be reduced—in fact, it might even go up—but the ORM tool generates 100% of the data access code automatically based on the data model you define, in mere moments.
  2. Application design: A good ORM tool designed by very experienced software architects will implement effective design patterns that almost force you to use good programming practices in an application. This can help support a clean separation of concerns and independent development that allows parallel, simultaneous development of application layers.
  3. Code Reuse: If you create a class library to generate a separate DLL for the ORM-generated data access code, you can easily reuse the data objects in a variety of applications. This way, each of the applications that use the class library need have no data access code at all.
  4. Application Maintainability: All of the code generated by the ORM is presumably well-tested, so you usually don't need to worry about testing it extensively. Obviously you need to make sure that the code does what you need, but a widely used ORM is likely to have code banged on by many developers at all skill levels. Over the long term, you can refactor the database schema or the model definition without affecting how the application uses the data objects.

One potential downside to using an ORM is performance. It is very likely that the data access code generated by the ORM is more complex than you'd typically write for an application. This is because most ORMs are designed to handle a wide variety of data-use scenarios, far more than any single application is ever likely to use. Complex code generally means slower performance, but a well-designed ORM is likely to generate well-tuned code that minimizes the performance impact. Besides, in all but the most data-intensive applications the time spent interacting with the database is a relatively small portion of the time the user spends using the application. Nevertheless, we've never found a case where the small performance hit wasn't worth the other benefits of using an ORM. You should certainly test it for your data and applications to make sure that the performance is acceptable.

There are a number of ORM tools available for .NET applications (see the "List of object-relational mapping software" topic in Wikipedia in the .NET section for an exhaustive list). Before Microsoft introduced Entity Framework, the open source NHibernate was probably the dominant ORM tool. NHibernate is ported from Hibernate, a Java ORM tool that has been available for years. But because Microsoft now bundles Entity Framework with the .NET Framework and incorporates extensive support for it in Visual Studio, Entity Framework has become the dominant ORM in the Microsoft development world.

From Learnnowonline - by

Saturday, May 3, 2014

Five diagnostic tools for your portable tech toolkit


When you head out for a job, be sure you take this collection of handy go-anywhere troubleshooting tools.

The world of computer administration requires you to be on your toes and prepared for just about anything. Along with that, you need to have tools that can get you out of nearly any jam — and that includes a set of portable diagnostic tools to help you when you don't have the time or the ability to install (or track down) software to solve the problem at hand.

Thing is, there are many diagnostic tools available — so which ones should you select for your portable toolkit? Here are five portable tools everyone should consider as first options for solving the problems that plague your systems.

: Process Explorer

Process Explorer (Figure A) is the tool to use when you really need information about a process and what file or folder that process has open. This tool is a tremendous help in discovering what application has a file or folder locked — especially when you can't seem to eject an external drive.

Figure A

: Process Explorer

Process Explorer (Figure A) is the tool to use when you really need information about a process and what file or folder that process has open. This tool is a tremendous help in discovering what application has a file or folder locked — especially when you can't seem to eject an external drive.

Figure A

 

Process Explorer consists of two windows. The top window gives a real-time listing of active processes (and their owning accounts). The bottom window displays information based on the mode it's in. In handle mode, all handles that the selected process (from the top window) has opened will appear. In DLL mode, all DLLs and memory-mapped files that the selected process has opened will appear.

2: SystemRescueCd

SystemRescueCd (Figure B) is a bootable Linux disk (can be run from either CD or thumb drive) that offers a full kit of tools for administering or repairing your system and/or data after a crash. Included tools will help you work with drive partitions, files, networks, and much more.

Figure B

 

This tool is effectively a full-blown Linux distribution that you run as a portable platform. The only difference is that the software is focused on diagnosing and repairing problems. Tools include Sfdisk, Partimage, Testdisk, GParted, Grub, secure hard disk wipers, programming tools, antivirus, and CD burners.

3: CrystalDiskInfo

CrystalDiskInfo (Figure C) monitors hard disks and reports the state of their health. It gives you all the S.M.A.R.T. information and lets you know how many times the disk has been turned on and off. This tool supports both HDD and SSD and even some external drives.

Figure C

 

You can keep CrystalDiskInfo running and set it up to send email alerts if something goes wrong. Also included are Automatic Acoustic Management (AAM) and Advanced Power Management Control (APM). A resident alarm will alert you of temperature issues.

4: WinDirStat

WinDirStat (Figure D) is an invaluable tool when you need to find out what is taking up all that space on a drive. Simply download it, run it, select the drive to test, and wait for the results. Once the test is run, you will be offered a colorized map of every file type on the drive.

Figure D

 Locate a color that is taking up the largest amount of space, right-click that color, and open the folder to find out exactly what you're dealing with. If you ever run into a situation where a C Drive has filled up, this is the first tool you want to grab.

5: Console Portable

Console Portable (Figure E) is a console window enhancement that can be run from a portable drive. It also allows you to add your own custom scripts (placed in ConsolePortable\Data\Scripts). Features include multiple tabs, text editor-like text selection, different background types, alpha and color-key transparency, configurable font, and different window styles. If you do a lot of your diagnostics from the command line, you should have this customizable console along for the ride.

Figure E 

 

Ready to roll

Your diagnostic toolkit is one of the first things you should put in your pocket when you head out for a job. These five tools should be able to help you with numerous situations, from damaged data to virus infections — and everything in between.

 

Friday, May 2, 2014

Five things managers do that job candidates hate


For managers, the hiring process is, admittedly, a bear. But it's also time-consuming and arduous for job candidates. Here are five things you can do to make the experience more pleasant for those who apply to your open positions.

The hiring process is, admittedly, a bear for managers. It's time-consuming and arduous. But enough about you. How do you think the job candidates feel? Because the process is all that for them too, as well as being pretty scary. Here are five things that job candidates wish you wouldn't do during the hiring process.

1.  Already having an internal candidate in mind

I've worked at some companies that have a policy that every job opening has to involve interviewing external candidates even if you already have an internal candidate in mind. I've also worked at jobs that require managers to open a job to internal candidates even if they have no intention of hiring someone internally.

I know that companies are just trying to make sure they open things up to all the people they can in the hopes that they get the best person, but this still rankles if you're someone looking for a job. You're playing with people's time and expectations.

2.  Waiting too long to let a job candidate know something

Waiting weeks and weeks for an answer is bad even if the answer is that you got the job. It's pretty devastating when you find out that, after all the waiting, you don't have the job.

Maybe you're with one of those companies whose deciders take all that time because they're striving with surgical precision to make the best possible decision. They want the best person and they also don't want to waste money with a bad hire.

But you know and I know that the most common reasons for keeping candidates waiting is that

  1. You're waiting to see how your real first choice works out before you let the others off the hook completely
  2. The decision to hire, and who to hire, has to go through corporate channels –a process that is slower than molasses in winter.

3.  Not letting a job candidate know if he or she did not get the position

If a job candidate doesn't hear from a company at all, he or she knows they don't have the job. But it's still disappointing and disconcerting not to hear anything. Is this just laziness or rudeness on your part?

I will allow that you may just want to avoid any kind of unpleasant experience. After all, it's not a lot of fun breaking that kind of news to someone.

Maybe you're also concerned that  if you go into some detail about why a candidate didn't get the job, you could be setting your company up for a lawsuit. I know of one instance when a woman applied for a job with several people from the company she presently worked for. The reply was that her qualifications were not up to par. Yet, that company hired several (male) employees who were a couple of levels below her at the current company and who were not as qualified as she was. She sued.

Still, there's a way around that. Just send out a general notice like: "Thank you for showing interest in the (POSITION) with (COMPANY). This letter is to let you know that we have identified our finalist and will not be moving forward with your candidacy." What's so hard about that?

4.  Vague, misleading job descriptions

From the looks of some want ads I see, it looks like some companies use a boilerplate job description and just adds a few IT-related terms. But it would save a lot of time if you would just come right out and be specific. For example, instead of saying you're seeking someone who has "experience with object-oriented JavaScript or programming," (which could, in some minds, mean a person who once watched someone create a desktop widget), be specific: "Extensive knowledge of DOM scripting with native JavaScript and familiarity with JS frameworks such as jQuery or Mootools." "Experience with..." is perhaps the vaguest, and most open to interpretation, phrase one could use. Try to avoid it.

5.  Interview process is too long

Is your company's interview process so long that job candidates could qualify for HR benefits? And I'm not talking about all-day get-grilled-by-the-team-then-four-VPs kind of interview. I'm talking about one process that includes a fifth or sixth interview. For the guy who actually gets the job in the end, this is forgivable. Sort of like birthing a baby. But for the people who go through that long process only to be told they don't have the job, it's confusing and makes them question everything about themselves.

I know you're seeking perfection, but I can tell you that there are some people who are just extremely good at interviewing and not doing the actual job. You'd like to think that by putting candidates through a process longer and more arduous than a Keeping up with the Kardashians marathon you'll be able to spot the perfect person. Unfortunately, the effort does not always end that way.

Hiring is a big deal and it's important to find the best candidate for a position. But there are things that you, as a manager, can do to make the process easier for those folks who are applying.

Five ways for IT pros to shine in 2014

By Joseph Parker


When you take stock of your career achievements and failures, be sure to also look ahead and consider forming these good habits.


In our ever-changing business environment, how do you stand out amongst your IT peers? Below are tips that I hope will help you get started down the right path. If you form these habits properly, they will transcend the workplace and flow into your personal life as well.

1. Evaluate your present position

In Robert Greene's book The 33 Strategies of War, he explains that "…seeing things as they are…" is a key component in any successful strategy. So, the first step in planning for the upcoming year is to assess yourself honestly and make a change where there is weakness, confusion, and self-doubt.

2. Give solutions, not complaints

There are always problems at work; fortunately, problems come with opportunities. You should focus on the problem rather than the hype and then map out solutions as a result of what you see, taking into account all of the circumstances that caused the issue (be sure to integrate tip #1 into this process). When you present your solutions, you'll be perceived as a problem-solver, and this could open more doors for you in the future.

3. Be strategic with project tasks

You should see every task as being part of a larger project or goal -- in short, look beyond your assignment and at the big picture. As you break down projects into manageable parts, try to foresee what could go wrong at each step. If something arises that was not accounted for, respond accordingly, taking into account the present situation and compensating/eliminating the emotional reaction. By seeing things as they are and not just how they appear, you'll separate yourself from those who panic.

4. Serve others

If you're a manager, you should serve employees who report to you by providing them with the resources they need to succeed. This can range from good communication and trust (the antithesis of micromanagement) to actual tools they use in their work. In doing so, you enable each one of them to successful, which in turn leads to your success.

The same concept applies to working with clients; you should serve them in their expectations, and be honest at each stage of their prospective campaigns. When you support others to whom you are dependent, you also empower them and support yourself in the process.

5. Create opportunities for yourself

Every industry has questions that need answering, so you find ways to answer them -- even if it means creating the project for yourself. This will show others where opportunities lie, and it will create a lasting competitive edge for yourself and the company. Contrary to popular, we are all responsible for what we do and don't do, the latter becoming a regret. You can create opportunities, even where none appear to exist.  



ITWORLD
If you have any question then you put your question as comments.

Put your suggestions as comments