I'm not sure how Visual Web Part is different from the actual Web Part in SharePoint 2010.
Thanks!
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityShort explanation: As far as usage is concerned, in many common cases there are almost no actual differences - anything you can do with a webpart you could do with a visual web part. For many points of view the visual web part is only a tool that enables the developer to work with a user control instead of creating all controls in codebehind.
Visual web part are born (afaik) from the SmartPart webpart project first seen on SharePoint 2007. The idea behind that project was to create a web part that could display any user control, so that programmer could work on ascx file as for any other web project instead to have to resort to programmatically create the controls via the CreateChildControl method.
The visual web part template introduced in Visual Studio 2010 just does this: it creates a simplified smartpart that displays the attached user control by adding it to the control collection in the CreateChildControl event. No more no less.
That said, beware that the visual web part does use a control, so it may cause issues in specific situation. First thing that comes to mind is that a visual web part is not supported in a sandbox solution (but you can use a modified template - see here or search for sandboxed visual web part in the visual studio gallery).
Waldek does a great job in is blog listing all the main differences: here is the link. What follows is just an extract of his notices, reposted to avoid link rooting. Also notice that as posted by almostSharepointMaster in his answer, you should also have a look at this page from Microsoft which also provides some samples.
visual webpart is a webpart that contains a reference to an ascx file that contains your controls.
a webpart is where you create your controls and everything else within it.
visual webpart is better for the designer to change the layout without going into c# code. So you would only need to change the ascx to change the look.
In Microsoft Office SharePoint Server 2007, developers create Web Parts by deriving from the WebPart class. One of the challenges that you face when designing a Web Part that has a complex user interface (UI) is the lack of drag-and-drop support. You must write the code from scratch, in the CreateChildControls method, to create the layout design of the Web Part, which can be time consuming.
An alternative approach can save development time:
Create a web user control by using Microsoft Visual Studio 2010 and design the >control with the Visual Web Developer designer.
Write the code-behind implementation of the user control.
Create a Web Part to host the web user control.
Visual Web Developer provides drag-and-drop support without the need to write supporting code.
the main point to take note of is this:
Microsoft SharePoint 2010 introduced Visual Web Parts. Visual Web Parts are similar to user controls in that you can simply drag and drop items from the Toolbox onto your custom controls to create a Web Part UI. You also get the code-behind file where you implement the UI logic. Technically, the SharePoint 2010 Visual Web Part is an ASCX web user control that is hosted inside a standard Web Part.
A Visual Web Part is simply a classic Web Part that automatically loads the web user control with it. The advantage of this approach is that you can use Visual Web Developer to design the web user control. Traditional Web Parts differ from Visual Web Parts in several ways.
for more detailed info with advantages and disadvantages check:
http://msdn.microsoft.com/en-us/library/hh857549(v=office.14).aspx
btw im creating a visual webpart at this moment and its a bit of a pain but easier for the designer to ammend. Webparts for me is better to code by that i mean takes less time. Why? becuase i still have to make the ascx and the webpart to host the ascx :(
hope it helps :)