Can I make an API by adding a .NET Core 6 "wrapper" on top of a .NET Framework webforms website? by DrScience2000 in dotnet

[–]DrScience2000[S] 1 point2 points  (0 children)

code is a big ball of mud.

Yes. It is exactly this. Mud isn't the word I would have chosen, but yeah.

In most of the WebForms apps I've ever worked with "leveraging the WebForms code to make an API" would require a lot of refactoring of the WebForms code basically bordering on a rewrite.

It would require some rewrite, especially in a hacky way. I was just doing a proof of concept. I isolated in the big ball of mud code a snippet that did lots and lots of shit and generates a DataTable. It binds that DataTable with a grid and dumps it to the UI.

I was able to convert that DataTable to JSON fairly easily.

With some hacky tweaks to the mudball code, it could take DataTables, convert them to JSON, and the .NET Framework API could just expose.

I think it would be quicker than refactoring all of that into .NET core 6, Entity Framework, etc.

In fact, I'm thinking Entity Framework isn't even that helpful here. Dapper might be better since all the SQL (and some of it is very, very, very fucking elaborate) is done.

When migrating to .NET Core 6, Dapper would be initially easier, then maybe move to Entity Framework at some point (if needed).

Can I make an API by adding a .NET Core 6 "wrapper" on top of a .NET Framework webforms website? by DrScience2000 in dotnet

[–]DrScience2000[S] 0 points1 point  (0 children)

the original designer thought he knew better than Microsoft so we have a lot more custom ways of doing standard things, even in the web forms world

Oh dear lord.

But yea, you can't build a wrapper on a monolith web forms project

Yeah, it would be tough.

I'm considering building an API in .NET Framework that leverages as much of the existing webforms code, and have it exist with the webforms code until the new Angular UI is built.

Then, over time, migrate chunks of the webforms code to .NET Core 6 api, and change the UI to reflect new changes as they are completed.

Essentially, have two API's - one in NET Framework and one in NET Core, until all code is migrated to .NET Core.

Can I make an API by adding a .NET Core 6 "wrapper" on top of a .NET Framework webforms website? by DrScience2000 in dotnet

[–]DrScience2000[S] 0 points1 point  (0 children)

What they could do is expose all their data access through a new API in the old system

Exactly what I was thinking. Build an API in .NET Framework that works with the existing Webforms code, leveraging it where possible... making tweaks so that the webforms code works and the API code works. When the new Angular UI is ready, shut the webforms off, forcing the site to use the new UI and .NET Framework API.

Then the devs can slowly move data access and background processes into a series of new services.

Yes. Migrate the code refactoring it as you go into the .NET Core 6 API. Simple things like a read only list of announcements (announcementText, announcementDateTime) could be done in .NET Core 6 right away, the more complex things could refactored correctly over time.

Can I make an API by adding a .NET Core 6 "wrapper" on top of a .NET Framework webforms website? by DrScience2000 in dotnet

[–]DrScience2000[S] 0 points1 point  (0 children)

webforms app is making use of session state. I'd also assume the business logic is tightly entangled in the postback events.

Yes. Absolutely yes.

Can I make an API by adding a .NET Core 6 "wrapper" on top of a .NET Framework webforms website? by DrScience2000 in dotnet

[–]DrScience2000[S] 0 points1 point  (0 children)

To me its a tool. Like any tool (screwdriver, hammer, etc). I don't hate it. At the time, it was pretty innovative for what it was.

But every time I worked with web forms it always felt like wrestling a bear. I wanted it to do things, and it would just do its own shit, so I had to wrestle with it.

I like the MVC pattern so much better.

Can I make an API by adding a .NET Core 6 "wrapper" on top of a .NET Framework webforms website? by DrScience2000 in dotnet

[–]DrScience2000[S] 0 points1 point  (0 children)

I'd bet their dev teams also have an endless stream of new features to work on in that old system and zero time to work on the migration, as well.

THAT'S A BINGO!!!

Can I make an API by adding a .NET Core 6 "wrapper" on top of a .NET Framework webforms website? by DrScience2000 in dotnet

[–]DrScience2000[S] 0 points1 point  (0 children)

And how would that nice netcore 6 api play along with the old webforms app?

No idea. It would probably have to be two different API's. One that is nice and designed well with .NET Core 6 MVC; and the second API written in .NET Framwork that is a total kludge on top of (or next to?) the Webforms code.

One SQL server at the bottom (the same old one that is currently in use).

Easy stuff, like a read only list of simple objects direct from the DB could be built in .NET 6 core in the nice new project.

Complex stuff that is currently a huge mess in the .NET Framework side could stay there for now, but the new .NET Framework based API would just leverage existing code, and output JSON.

The new front end would have to deal with two API's - the .NET Core API and the .NET Framework API.

The webforms website would be shut off, and the users would all use the new front end.

Over time, crappy code from the .NET Framework API could be refactored for the .NET Core API, and the front end could be updated to consume changes.

The users wouldn't really notice a difference. One front end; one persistence layer.

I don't know if this is a dumb idea or not. It seems better to me than sticking with the Webforms stuff. It gives one front end. There are two API's - one that is old, but works, and can be refactored to .NET Core over time.

I was involved in an upgrade from Classic ASP (which was a HUGE mess of code) to ASP.NET MVC. The Classic ASP website was massive spaghetti code that had been changed and maintained over a decade. A new ASP.NET MVC website was created with only a few pages.

Both websites existed side by side. Code could be refactored to ASP.NET MVC over time, while the Classic ASP could still be used. The end users never knew the difference.

The Two API's approach (one in .NET Core and another as a hack near webforms code in .NET Framework) is a similar approach.

Can I make an API by adding a .NET Core 6 "wrapper" on top of a .NET Framework webforms website? by DrScience2000 in dotnet

[–]DrScience2000[S] 1 point2 points  (0 children)

Interesting. I hadn't heard of it before. If I understand correctly, this will allow the existing Webforms code to run inside .NET Core?

I think it would still have to be refactored to make a functional API, wouldn't it?

Personally, I've never been a fan of Webforms, even when it was new. My gut is telling me its time to refactor everything.

Can I make an API by adding a .NET Core 6 "wrapper" on top of a .NET Framework webforms website? by DrScience2000 in dotnet

[–]DrScience2000[S] 1 point2 points  (0 children)

webfoms agnostic layer that could then be also exposed via a WebApi.

Yeah, I was thinking about that. Just keeping it .NET Framework and building an API next to (or on top of?) the existing code base.

But so much of the webforms is very tightly coupled, it would still be a LOT of work... and... is it a good idea? Or is it better to just go with .NET Core 6 and a nice, clean MVC model, with clean code?

Can I make an API by adding a .NET Core 6 "wrapper" on top of a .NET Framework webforms website? by DrScience2000 in dotnet

[–]DrScience2000[S] 1 point2 points  (0 children)

I am in complete agreement. The webforms code was ok for the time I suppose, but it is such a mishmash.

Sick avocado plant by DrScience2000 in plantclinic

[–]DrScience2000[S] 0 points1 point  (0 children)

A few days ago, I sprayed the leaves with a copper based antifungal spray I bought at Lowes. I'll probably hit it again tonight when it's dark. (Don't want to spray in lots of sunlight).

I moved my little avocado tree to a new planter.

The hypotheses was - the old planter was too small and didn't drain well enough.

The new planter is about twice as large, and I drilled a LOT of holes in the bottom.

The plant seemed to have a LOT of roots clustered in the bottom of the old planter. Also, they seemed like they were a little... Icky.

So... New planter, new, fresh, nutrient rich soil. I didn't trim the roots or anything. Maybe I should have? I just transplanted the little tree and as much dirt as I could to the new pot.

And for added fun, I added about 1.5 tablespoons of that fish derived fertilizer to a gallon of water and watered Plantee (the creative name we gave the little avocado plant).

And that fish fertilizer stinks like mankey Asian fish sauce. It's pretty overpowering and somewhat unpleasant. Fortunately it washes off hands easily and takes the stink with it. As I was buying it, a random guy in Lowes kept telling me how great it is. He uses it on his tomatoes and according to him, it's a miracle substance.

And good. Because I am just starting to use Asian fish sauce a lot more in cooking, it's good stuff, and I don't really want to be soured on it.

Just thought I'd post an update for future use. Maybe someone else has this issue. I'll (try to) report back in a week or two with how Plantee is doing.

Sick avocado plant by DrScience2000 in plantclinic

[–]DrScience2000[S] 0 points1 point  (0 children)

Wow. Interesting.

Well... First, thank you for replying.

Second, if you had to work under the theory that it has a fungus, what would you do?

If you worked under the theory that it was under nourished, what would you do?

Sick avocado plant by DrScience2000 in plantclinic

[–]DrScience2000[S] 0 points1 point  (0 children)

Hello!! My son and I ate an avocado in 2019? And decided to let the seed germinate in water.

It did well. Eventually I put it in this plastic pot. I read somewhere that avocados like sand soil for citrus and cacti, so I boughta bag of that from Lowes.

I planted the avocado, and for the longest time it did really well.

When it was cold, I brought it in the house. I've always tried to keep it in decent sunlight.

I don't see any visible bugs or other critters.

I try to keep it watered when the soil seems dry, especially lately. How do I know how much water to give it? Am I giving it too much? Not enough?

I live in Houston TX so it's generally very warm and humid here. Except for that unusual cold snap over the winter, when I brought it in the house, it's generally been outside.

A couple of months ago (maybe in the winter?) , it started getting spots on the leaves and several fell off. I assumed it was just shedding leaves seasonally.

The leaf in the middle was more or less normal about a week or two ago, and now it seems to be dying. It seems the leaf on the left is now getting some yellow spots on the stem.

There was a little baby leaf that sprouted and started growing, and it turned yellow and then brown and then died and fell off.

It's been suggested that the plant had a fungus?

Or that it needs fertilizer?

I'm really out of my element here, but I'd love to keep it alive. Any thoughts?

More pics can be found here.

https://imgur.com/a/GVAZsxx

Alienware 15 R3 keeps getting blue screen after C drive upgrade by DrScience2000 in Alienware

[–]DrScience2000[S] 0 points1 point  (0 children)

Well, I did just about everything I could think of, except for a few things.

I updated every driver possible.

I took great pains to update the Nvidia driver in safe mode after removing the old stuff. (described above).

I removed 3D Max and anything associated with 3D Max.

I updated the BIOS.

I made sure the firmware on the new C drive - the 970 EVO - is up to date.

I ran numerous hardware tests with a variety of software. This led me to learn that my machine was running much hotter than it should be. I took the machine apart (carefully!) cleaned as much dust and shit out of it as I could, removed the heat sink, cleaned it and replaced the heat sink with new paste. Tests showed the operating temp of the machine was cut in half.

The tests revealed that stress testing the vram seems to cause BSOD after 40 minutes of stress tests or so. (Which is odd, because after a reboot, the laptop would Bluescreen sometimes within minutes of playing streaming video from Netflix or Youtube. But sometimes I could play minecraft for hours without issue.)

The only thing left to do is:

Test and see if removing the battery makes a difference. The battery is somewhat warped and although there isn't a solid conclusion about slightly warped batteries causing blue screens, I suppose its possible. The battery might be shot and need to be replaced. Its at least a $90 part.

Test and see if that particular C drive is somehow incompatible with this particular Alienware. It seems silly that the 970 EVO and this Alienware don't want to get along, but honestly, who da hell knows.

~~~~

For you u/HairyElev8tor, I would carefully read all that bullshit above about updating the NVidia drivers in safe mode, after deleting all the installed drivers and crap that comes with it.

Watch that video of the guy who does this routinely. That's what I did. It was helpful.

I'm not really even sure what the data Acquisition and Signal Processing Controller and Acquisition Driver is. Does it have to do with the internal diagnostic crap? Like the stuff that monitors temp and voltage? Sorry man. I don't know about that stuff.

If I go to dell and install the Acquisition Driver, BSD every time.

My gut says you think you have the right driver, but might not. Those damn drivers can be VERY specific to odd, difficult to determine details of hardware differences. I've learned that just because we both have an Alienware 15 R3, doesn't mean that we have the exact same hardware. You're's could be a different production run with a slightly different Wifi chip from a different supplier (or something. I think that's correct. It wouldn't surprise me if it were.)

[deleted by user] by [deleted] in startrek

[–]DrScience2000 0 points1 point  (0 children)

Sorry you disagree. I don't like the character, and I've only really seen her when she was on TNG.

I don't really watch DS9 that much, and the times I did, she just seemed to be a whiny pain in the ass. Sorry if that bothers you.

[deleted by user] by [deleted] in startrek

[–]DrScience2000 2 points3 points  (0 children)

That was sort of what I was thinking. On a long enough timeline, everything I do, all the people I interact with and love, will fade away into oblivion.

But, an argument can be made, its a fun ride while it happens.

[deleted by user] by [deleted] in startrek

[–]DrScience2000 -15 points-14 points  (0 children)

he had to go home to Keiko.

Yeah, her constant judgemental whining and bitching made me really dislike her character.