Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 2 .Net Roadmap

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,

I'm asking a .Net question here because I've been developing VFP apps for 16 years now and I need to get going in the Visual Studio .Net web development stuff and I cannot figure out a roadmap to get there. Its so intimidating at all the different apps I have to know to be productive in this new environment as a 2 man shop. Looks like I have to learn a lot about Visual Studio, OOP, .NET, C#, SQL Server, Php, Entity, JQuery, Java, Css, IIS, MVC, and whatever else I don't know about.

My experience over the years has been in SCO Unix, filePro, VFP3-9, MsSql, OOP, and IIS. So, with this in mind what should I be studying and when(order). Because I'm starting as a relatively new programmer to .Net, what study order would yield the most production of getting a VFP app migrated/re-created as a .Net Web app?

Study what 1st, 2nd, 3rd, and so on?... (and why you believe its best)

Many Thanks,
Stanley
 
Just like to high-light one small item from Craig's post
2. At this point you should have some basic understanding of ASP.Net MVC and Entity Framework Code First
You will probably start your first app with old-style ADO.NET SQL queries etc , but one of the most powerful aspects of the new dotNet methods is the use of Entity FrameWork. So , when you have your first mini-CRUD app working with SQL calls, rebuild it using Entity Framework

below is a sample of code , I had to use just to populate a combo in an ASP MVC app, the old way , and beneath it the EF way, I think you will find the difference impressive.

So , #1 tip , learn/adopt ENTITY FRAMEWORK

the old way

Code:
      public static DataTable SqlGetTable(string qry)
        {
            if (gConnITSS.State.ToString() != "Open")
            {
                gConnITSS.Open();
            }

            DataTable dt = new DataTable();
            SqlCommand cmd = new SqlCommand(qry, gConnITSS);
            SqlDataReader rdr = cmd.ExecuteReader();
            dt.Load(rdr);
            gConnITSS.Close();
            return dt;
        }

        public List<Record2> GetRecords(int appID)
        {
            string qry = @"select * from records where appID= @d1  order by recordid desc";
            SqlCommand cmd = new SqlCommand(qry);
            cmd.Parameters.AddWithValue("@d1", appID);
            DataTable dt = Utils.SqlGetTable(cmd);

            var items = new List<Record>();
            foreach (DataRow row in dt.Rows)
            {
                items.Add(new Record
                {
                    category = Utils.ColVal(row, "category"),
                    details = Utils.ColVal(row, "details"),
                    date = Utils.ColVal(row, "date"),
                    version = Utils.ColVal(row, "version"),
                    requestby = Utils.ColVal(row, "requestby"),
                    description = Utils.ColVal(row, "description")
                });
            }
            return items;
        }

the EF way

Code:
	public List<Record2> GetRecords(int appID)
        {
            Models.ITSSentities db = Utils.GetModel();
            var recs = (from d in db.Record2 where d.appID == appID orderby d.recordID descending select d).ToList();
            return recs;
        }

 
I disagree. MVC uses EF out of the box and is the default implementation. Also, you don't have to write the linq code the way you did. It can be simplified.

public class TimeController : Controller
{
private EFContext db = new EFContext();

public ActionResult Index()
{
var times = db.Times.OrderBy(t => t.Name);
return View(times);
}

}

Craig Berntson
MCSD, Visual C# MVP,
 
If you start with an Empty MVC app ,it does nothing by default , you can just as easily go down the path you know , which in my initial case was ADO.NET etc

But the main point I was trying to make was that EF had got a lot of bad press in the past, it has some learing curve but is hugely beneficial in the end, and well worth the learning effort.
 
OK, you CAN go that route but I think it makes things more difficult as every book, training video, and example I've seen use EF Code First. The goal here is to get up and running as quickly as possible. IMO, that means forgetting about ADO.Net for now and just use EF. You may find later that you need to use ADO.Net for some things, so it's still there as a backup.

Craig Berntson
MCSD, Visual C# MVP,
 
We are agreed see prior email
#1 tip , learn/adopt ENTITY FRAMEWORK
, EF is the way to go , and for your info, Stanley, EF applies across the board , WPF for desktop , MVC for web/mobile/tablet
 
>EF applies across the board , WPF for desktop , MVC for web/mobile/tablet
You have to add: Windows Phone and Windows 8 tablets only.

Stanley, aiming for the mainstream of users going towards tablets is not a precise enough aim. If you aim for those you still aim for all platform. More specifically you aim for native apps. Non native apps are all less successful than native apps, not only for games. The promises of cross platform development tools like Xamarin are not worth it in my opinion. They promise to even support device specific things and look device specific, but forget about one codebase for all devices, it doesn't really work out.

If you really want to go for native apps you need to learn much more, C# for Windows Phone/tablets, Objective C for iOS and Java for native Androids apps, indeed here it's the main differnt world of Java, not just a little javascript. You need it in a specific flavor on top of a specific virtual machine, the Dalvik_Virtual_Machine You can see there you need a converter for normal .class to .dex files.

This is all really unsatisfactory. To have the slight chance to reuse some of the office automation at least, you would need to stay on the MS platform, but indeed the market share of Microsoft is bad. And despite of all the success of the past, this time I think Microsoft will not gain the main market share after others had earlier success.

So if you don't have your current Microsoft customers of your Windows applications in mind, then leave at this stage and go for Android. That means really going for Java.

If I judge the market by my own behavior, tablets are for private end users, consuming media, movies, music, books. Checking your mail, using facebook, twitter and other social networks. On mobile navigating, using maps, comparing prices while doing "real world" shopping, and of course phoning. But that's it. Do your applications aim in these ranges?

A much smaller part is using the tablet in business, eg for entering inventory directly in a stock or warehouse.

The experience you make for the transition of customer wishes from desktop applications towards web and mobile is mainly for end consumer shops. I am not developing software for end consumers today, but business applications used in the corporate network, product development and testing, not shops. That may differ between us. I also do multi user applications, and that's also not the typical smartphone or tablet app, they only may contribute or profit from a central database, but that central database mainly is driven by desktop apps.

In my oppinion business apps will stay desktop. I want my big display, not just high resolutions on 10" tablets. Tablets are larger PDAs, auxiliary devices. Maybe enough for management, maybe there is a large market share for such apps. It also would be nice if large displays vanish from the office desks, but look at the trend for multiple displays. You can't do the bigger stuff like video editing, software development, stock exchange, writing books, secretary work etc on tablets. And despite all science fiction I don't think this will change to more natural interactions to computers eg by speech plus tablets. I think management will think along that line, but they will fail, if they will remove desks and desktops from the office.

No, the biggest deal for tablets are professions working mobile, and there you will have new customers, pollice officers, detectives, sales men, doctors and nurses, care attendants, kindergartners, teachers. That's new applications, not just old ones brought to tablets.

So it's short sighted to only judge the future market by device type sales.

Bye, Olaf.



 
No, Craig, I just had been to a conference last year and attended some sessions about app development. I have seen and heard, what experts on the field have to show and say. Even those advocating PhoneGap/Cordova admitted, native apps are a league of their own and that will always stay. I have seen how much you can do with the libraries these cross platform tools offer, but they always are one step behind native looks, if the new iOS will come, for example.

Surely you can do more than with a browser app, surely you can do good enough apps for businesses, it's not always about the look and feel in this area. That's even more true for individually designed apps. The stack of HTML5+CSS3 is an impressive new candidate for cross platform development aside of Java. Now add hardware device addressing. Beiersdorf for example has hundreds of electronic scales all working on COM ports, not network scales, not USB scales. They can't change hundreds of scales at once, those are high quality, high precision scales, each costing several thousand Euros, you don't change that to new scales. And there you go, you're lost with RT or Android or iOS here, even not native.

That's just one specific thing surely not important for most of the other stuff I do and there could be a separate solution for that, but it shows mobile or tablet devices and cross platform development is far from being a complete replacement. What you can do with any OS and any device type is entering some data and querying it. And of course that is the core of what we do all the time and that may be sufficiently supported by Cordova or Xamarin, but it's not the end of everything I would need. Since Microsoft and Android are the only open worlds, at least Apple is out of question for my needs. And since the market share of Win RT/Phone is low the only platform interesting me is Android. If you asked me, I would go native Android app development. But that's just me and that's just in case app development will be more important. For it's still Windows desktop.

Bye, Olaf.
 
That was last year. This is this year and it's a whole new world now. Even Microsoft fully embraces and supports Xamarin for the first time ever. (THis is new in VS 2013)

Craig Berntson
MCSD, Visual C# MVP,
 
>#1 tip , learn/adopt ENTITY FRAMEWORK
Yes the main objective here is to get productive as quickly as possible.

Just finished the Visual Studio 2012 Introduction part 1 & 2 courses and I'm super impressed. Also finished the jQuery Introductory course and looks doable.

The problem I'm seeing is mixing all the different technologies together. Mixing javascript with C# with Entity with CSS and so on. I'm currently reviewing Scott Allen's "Building Applications with ASP.NET MVC 4" beginner course. Scott is jumping all over the place with a touch of this and a touch of that, therefore I'm getting a touch of mass confusion. I am however understanding a lot of his teachings, its that I see it taking a long time(years) before I'll ever be able to produce anything of value.

So far, I'm not trying to write code along side of anyone's presentation, instead all my viewing has been more of a "high level view flight" identifying areas that I already know, the easier areas and difficult ones.

So far I believe I will be OK in Visual Studio. Looks like I can get up to speed quickly in jQuery. The MVC part is off-the-chart difficult...

I'll be looking at some other MVC and other beginner courses as PluralSight has many. Turns out this high level flight is taking a lot of time.

I am adopting Craig's plan of action including EF, by studying courses relative to what his plan describes. Thanks Craig for the detailed plan.

Thanks, Stanley

 
VFP was unique in that the language, IDE, and database were all tightly coupled. That's not the case with just about everything else.

Maybe I can help here. Some of this is basic and you may already know it.

- Doing web, means you have to run in the browser. Everything in the browser is HTML (the content), CSS (they layout/design), and javascript (the code). jQuery is just javascript. But easier! We'll call all this "UI stuff".

- You also need something on the server. MVC is simply a design pattern. ASP.Net MVC is Microsoft's implementation of MVC. I know some of what it does seem like magic. Don't work about how it does all the magic until you feel comfortable with working with it. Last night I was reading about some advanced controller, routing, and views. Even after two years working with this, it got complex in a hurry. So I just said, "Good to know it can be done. I'll come back to this if I ever need it." Entity Framework (EF) is simply a way to query the data (remember LOCATE/SEEK/SELECT * from VFP?) We'll call all this "Server stuff"

- Visual Studio is simply a high-powered tool that makes it easy to put the UI stuff together with the Server Stuff.

Feel free to post here if you have questions.

Craig Berntson
MCSD, Visual C# MVP,
 

Stanley , from your very first post
what study order would yield the most production of getting a VFP app migrated/re-created as a .Net Web app?
what is the fixation about going the WEB route ?? , your existing app(s) are VFP desktop apps, so presume they do not reach out the world, so why should they 'migrate' to the web ?? , can u give a short explanation of one/some of these vertical apps e.g. are they financial tracking, legal / medical / manufacturing what ??

right through this post, all the responders have said something like the following

If you stay with the desktop, you don't need web stuff at all

what is wrong with desktop , if you stick with desktop all you need is

1) Entity FrameWork : This is so HUGELY important to adopt as the foundation for everything, it brings you back to almost the ease of data-base zero-coding that VFP provides
2) WPF for the UI . and probably use e.g Telerik/DevExpress instead of the plain vanilla WPF from MS
3) Visual Studio , SQL server management etc , but they are very easy

Then if it turns out that whatever data-base this works off , also needs to be exposed in some way to the WEB , then and only then do you need to look at ASP MVC etc

IMHO , I have never heard such rubbish as claims that MVC/HTML5/CSS/jQuery etc can provide the same rich user experience for any line-of-business application, any-one show me a single one

I'm not trying to knock any views here, it's been a really good exchange, and any VFP shop that says it has no plans to consider change is not serving it's clients well
 
Hi clipper01

> what is the fixation about going the WEB route ??
1. When I originally became involved with computer in 1981, I chose multi-user Tandy Xenix over all the very limited variants which is unix based. After developing apps that ran on the unix server in a centeralized sort of way with only dumb telnet terminals on the client side, it was so easy to roll out a changes to 1 or 1000 clients in a single code chage at the server. Then came along distributed computing where client systems became smarter and that is what desktop programming is all about, as client versions of the apps has to be created, installed updated and the such. Now with web apps, we've come full circle and now we/re back to centralized apps. This alone will save our shop tons of time and money by allowing us to work with a centralized code base, where we make changes that are instantly available to the customer. Heck, they cannot opt out of the changes, unlike desktop apps where different versions must be maintained and supported.

I'm now seeing user experiences on web apps approaching desktop experiences in several arenas. So, why should I relearn desktop app dev and web app dev, when prety much anything that can be done on the desktop can now be done in a browser. If I'm going to have to throw away my VFP skills and learn this "TOTALLY DIFFERENT" (as someone said above), then I'd rather be thinking a single size fits all (MVC), as it will be needed later when mobile becomes part of the mix. If I stay with desktop, then the MVC stuff will have to be learned before adding mobile.

2. Web stuff brings bigger dollars,

3. If desktop was the thing, then I'd stay with VFP and forget the rest, however, for me to keep up and/or pass the competition, I have to move past VFP capabilities. For my customers to keep paying us serious licensing fees, we must deliver more perceived value than our competition, otherwise...

4. I personally have several web app ideas that I'd expect to be serious income generators, however I have no hope of implementing them without this web app knowledge.

5. I've been given the go ahead with migrating a couple of our apps that contains private data that my customers sells and will chip me in on the online sales. This is one of my main driving forces on getting this done.

6. Also note that when I'm speaking of web apps, I really mean browser based apps that will run in either an intranet and/or an internet environment, privately or publicly. The needed technology skills are the same for both with increased security on the public app. Just build for public access, and you got both.



> I have never heard such rubbish as claims that MVC/HTML5/CSS/jQuery etc can provide the same rich user experience for any line-of-business application, any-one show me a single one

1. Whayne Supply's POS and master catalog, Grainger's online catalog, Microsoft's Exchange Client WebMail and Microsoft Office Live 365, Google's apps, Adobe Photoshop, and on and on.

2. Take a look at
3. Take another look at:
4. A little time with Google should anyone a believer.

I believed as you over the years while keeping a close eye on them, however its a different world now where the browser is so much more that a rendering engine, but an integration platform. Take a look at the Kendo UI tools where those controls make VFP's controls look like toys. Image scanning, markup, pdf tooling is all available to browsers now.

Just my 2c worth... Stanley
 
Stanlyn, that gives a very precise goal now. If web is the future for you, your apps and your customers, then you should perhaps even leave the MS world. Visual Studio can do ASP.NET MVC or other web apps, but you can do much about the same and better and cheaper in development stacks with open source tools.

The MVC principle in it's core means a backend database (the model), a backend API handling the database access and communication with the frontend (the controller) and a frontend UI with desktop like interactions (the view). You're bad off with this in Visual Studio, as the visual Studio tools rather are going towards the MVVM architecture, not MVC, a slightly different approach. There is ASP.NET MVC, but in that respect this is already old school.

If you like the more basic MVC you can mainly use HTML5 for the View (the UI) jQuery or a jQuery based framework (and they are ALL based on jQuery) for the View logic (talking to the controller and providing data to the HTML5 layer), and if you don't have any knowledge in PHP, Python or Ruby, larn node.js, as it's also Javascript based.

jQuery is a core javascript library to know and you can even learn it before learning javascript. Take a look at where you can learn with really easy baby steps in a fun way. It's too small steps, if you ask me, but you get a foundation from the ground, this even aims for beginner developers. For a start begin first javascript an jquery lessons in parallel and you'll soon see jquery can do the same stuff with less code and easier and it offers more.

As IDE JetBrains WebStorm is a well foundation.

I'm saying this with any knowledge of node.js, I'm rather the PHP guy, but you can for example do somthing with the development tool stack of mongoDB, express, Angular.JS and Node.Js (called the MEAN stack).

I see MS developer tooling around MS SQL Server, if you go web, that also is one available backend, but many more are non MS, from small size data storage/local on mobile devices o HTML5 browsers: SQLite, mid to high size relational: MySQL, NoSQL: couchDB/mognoDB/... ,Big Data: hadoop.

Don't be impressed, I'm not having a certificate in any of those, I just have mapped them on the landscape. But it sounds plausible node.js would be a time saver, if you can't do any of the older scripting languages as PHP, you mainly learn the two Javascript Frameworks jQuery and Node.js and a new DB concept nosql, but you can also use MySQL, as there is a node-mysql module to connect to that old school relation database and reuse your SQL knowledege, at least.

Bye, Olaf.
 
Olaf,

Do you know the history of MVVM? Before complaining about VS going that way, I suggest you read up on it. And note, there is nothing that forces you to use MVVM, but it will make it easier to develop desktop apps in WPF.

As for cheaper alternatives, there is nothing requiring you to use Visual Studio to do ASP.Net MVC, but it will make it easier. Furthermore, many people are creating great apps with the VS Express editions that are free.

Craig Berntson
MCSD, Visual C# MVP,
 
Stanley,
fyi ,I'm probably in a similar situation to yourself, senior-citizen , mere-mortal vfp developer. I've done a few ASP MVC apps, my own web site with a login for service records and log in as CREST / FARM , and a tester app for a tablet/mobile recreation site ( a hobby site , bridge-playing that matches up players ) This may mean nothing to you , but you can see it does provide a pretty slick interface and is done primarily with MVC and jQuery Mobile.

So my vote would still be to stick with the MS Web stack, although I do have to say that what you describe sounds getting like to custom e-commerce on the web , u better hunker down for a couple of years to get up the various speed ramps
 
Craig,

where am I complaining about MVVM? I was just saying Stanley won't be able to stay MVC in Visual Studio and he perhaps should not go ASP.NET MVC, as that is a dead end. But I didn't say it's bad, it's only bad for someone wanting to do MVC.

I also said: "a slightly different approach", which also means you can learn it knowing MVC.

Overall I am saying I do VS, I recommend node.js to Stanyley, as he was saying: "Scott is jumping all over the place with a touch of this and a touch of that, therefore I'm getting a touch of mass confusion."m so he#s looking for a development stack which does not have too many new stuff in all area.

I myself am familiar and stayed familiar with web development, though I was not updating much of my knowledge, but I am fine with HTML, CSS, Javascript, PHP, MySQL. I found my way to VS, it's different for someone with a different background.

Indeed Express Versions are free and Action Packs also are a cheap way to MS Software licenses. Node.JS surely also is not the easiest stuff in the world, but it's Javascript plus a database and HTML&CSS, and that's the minimum you can get in that direction.

Bye, Olaf.
 
Olaf,

You said, "the visual Studio tools rather are going towards the MVVM architecture, not MVC". I spent nearly three days with the Microsoft web team last month. There is nothing coming out of Microsoft that suggests this in any way.

Why do you think MVC in VS is a dead end? There is no evidence of that. In fact, it's the preferred way to do web apps using VS.

Craig Berntson
MCSD, Visual C# MVP,
 
Craig,

I didn't have the impression. I know the ASP.NET MVC framework is maintained and supported, but as you say yourself MVVM rules for WPF applications. WPF is not web, true. But in the sense of the architecture model to be able to replace each tier, eg also the UI, MVVM would also be a successor architecture for web apps, wouldn't it? You can support several architectures to support several groups of developers, but there should be a recommendation for the most promising and future proof part of the .NET development world, shouldn't there?

I get the impression MS is taking "divide and rule" the wrong way, dividing developers in too many different camps.

Bye, Olaf.
 
I can tell you that MVC is alive and well and the preferred way to develop web apps with .Net. I spent three days with the ASP.Net web team last month at Microsoft.

I'm not sure where WPF came into the discussion. The original question asked about Visual Studio web development.

As for MVVM, if you want, you can do that with a web app using Knockout.

Craig Berntson
MCSD, Visual C# MVP,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top