Custom Web interface/design - asp.net

for background, I am quite the expert coder, in general, but for .net much more so in regards to console/application dev. I have an excellent idea for a web site, but I am unsure which tool/approach to use.
The part i would like direction on is the main interface. I want a central object containing lets say an image, text, and link, surrounded by an undetermined number of smaller pictures. clicking one of the smaller objects brings it to the center and a new sub of peripheral objects is loaded (presumably from a database). My question is, how best to do this?
I've started monkeying around is JS, though i thoroughly hate javascript. Is a custom control better? I have experience with mvc and web forms - which is better for this task?
I am unsure which is the best approach here.
I also want to animate the objects moving, and to use opacity to fade in/out the objects. I have already gotten some base animation functioning in js, but i feel like there is an easier way?

Related

Using iFrame for SPA?

Our company is redesigning a web service as an SPA. I designed the rough version of frontend using jquery+css+html. but one of my features is the Tabs interface. It can have up to 8 tabs and it seemed to slow down the whole web app. Each tab contains a table with sth like 100+ rows with the exception of few tabs that has a bit more complex ui.
Now, we have this another company that's been assigned to complete the service with the backend modifications and apply the new ui. This company insists on using iframes to make it easier for multiple developers to work to together at the same time and also improve performance.
I honestly think this makes little sense especially considering the DOM structure is hardly complex nor long for each tab. But the truth is iframe is something i do not like for no apparent reason. So i was wondering if people can advise on why not to use it or even, why i should go along with it
This is a question that is still relevant, so I'll throw in an answer 4 years too late. SPA's can quickly become monolithic, especially for enterprise apps, with slow build times, poor developer experience, framework lock-in and increasing difficulty to coordinate frequent stable releases. This is a more-or-less acknowledged problem, to which the solution goes under the banner micro front ends.
Here's a thoughtful article on Martin Fowler, on micro front ends. You'll note that Iframes are the 2nd "best" solution for creating a shell for your micro front ends, despite the fact that no one wants to use them because they're old fashioned and not cool. They permit a good degree of isolation between frames (separate documents, separate scopes). They're simple and well understood. IFrames descend from framesets, released with Netscape 2 round 1996. Web purists were horrified, but they straight away permitted content panes to scroll independently of the navigation, giving us the left-hand navigation panel that's with us still. So there you have it, frames are a permanently unfashionable but robust and useful solution.
I think that this is a bad idea to use iframes for this purpose.
iframe is slow, and pass events and info between the main frame to the iframe is not so easy.
The answer for this is very simple, use web-components.
This is solution for multiple developers to work together at the same time.Each developer works on single or multiple web-component, and also make development faster when you can reuse and share components.
If you load the components and render them in the right time you can gain really good performance, better then iframe.
Now to your problem, you can do any tab as a component and only when the user move to this tab render it. Thus you dont have to render all the tabs but only one.
Take a look at polymer - a library that is a sugar syntax for web-component.
You can also look at the other frameworks angular,react...

ASP.NET Design View - Moving Controls

I've recently decided to create a web app to host some algorithms - I normally just create them without care for UI. However this time I need to dive deep into UI. I'm familiar with bootstrap, css, asp.net and have made a good start.
I'm finding it very difficult to deal with asp.net controls in the design view and having too much trouble trying to achieve simple tasks such as moving controls to different areas of the webpage. When I have two textboxes the design view forces one on top of the other leaving me so confused. Then when I try to move my bootstrap button it randomly creates paragraphs and refuses to move the button!
I'm looking for some genuine sincere advise on how I would deal with the design view on asp.net when moving controls and what the best techniques are. Also advice on how to make a modern UI, best techniques (perhaps bootstrap mentions) etc...
I am creating a fairly simple data display app in asp.net (visual studio 2015) - (most of the algorithm complexity is going to be behind the scenes and nothing to do with UI). Comprehensive and detailed advice would be really appreciated. Specifically modern good looking UI in relation to data grids, textboxes for user input (as parameters), dropdowns - you know the typical data app.
I'm sure this will be greatly helpful to many others as well!
Yeah, as I web designer who has had to work with asp.net in the past I completely feel your pain. It's not easy to get a modern look mostly because asp.net isn't a modern tool and kind of has a visual vocabulary all its own.
That said, I found I could get decent results by sticking as close to CSS based solutions as I possibly could. You can see some of those results in the following links:
http://www.design-experiments.com/
http://www.troyjnorris.com/shoppingcart/
I found that a minimalist approach tends to come with the best results.
A good process to follow:
- Build what you want to build.
- Add container divs to make selecting elements easier around your controls. This will greatly improve your ability to position elements the way you want.
- Use your browser inspector to figure out the auto generated element names as they appear on the screen. Getting good selectors is half the battle in CSS.
- Rip out the styling you don't like. Standard reset style sheets won't do here. You'll have to build your own to zero everything out on the elements you want to style so you're not fighting the out of the box look of the controls. Again you have to rely heavly on your inspector in a web browser to see what styles everything is inheriting.
- Use google fonts to define visual style of the page.
- Stick to mostly black or white backgrounds.
- Bootstrap is helpful for a responsive grid, but won't do much good attempting to style most of the elements on a page as they're not meant for that.
- As you might have noticed in the examples above the visual interest comes from elements that are unrelated to the asp.net structure and limitations. So have something like that, even a background image or some paralax so it feels like something is going on on the page.
Hope that helps.

Is there a wireframing tool for web apps that can re-use my own custom CSS?

I have been searching for and have not located (I fear it doesn't exist) a wire frame application that will use our current css for objects.
We have spent a lot of time perfecting our css to get the look we want, now I want to be able to use that css for new mockups without creating new objects each time we add something (as we would have to in photoshop).
In a perfect world, it would even handle the page layout so all that remains is the logic.
Has anyone heard of a tool that can do this?
I haven't used it, and I can't vouch for it, but https://alpha.easel.io/ might fit the bill. It's still in beta, but looks very interesting.
From their homepage: "Implement designs quickly using exact CSS properties rather than guessing from a mockup."
http://axure.com is a popular wireframing tool. There ways to make it use custom CSS: http://enterpriseux.tumblr.com/post/8972215862/an-axure-html-prototype-hack

Is Adobe Dreamweaver able to speed up markup development process for ASP.NET developers

I understand that this question may be subjective, this is why I need an answer from an ASP.NET dev who has actually tried using Dreamweaver in conjunction with VS2010 ASP.NET MVC development.
While working on a web site development project, I spend 60% of the time fine-tuning the markup and css, 30% of time writing JS code and only 10% goes to C# logic coding. I am looking for the way to reduce the markup-mingling time to finish the projects more quickly. Is Adobe Dreamweaver able to help me, an ASP.NET MVC developer, to implement markups provided by designers more quickly?
It's a big Yes and No and I'll try to explain because it's kind of up to how you use it.
The Design view
If you approach the whole implementation visually, from Design View, like Adobe thinks you're supposed to do it, it's a big conspiracy. You'll find yourself spending more time traveling miles across the screen with your mouse. Keyboard coding -> always faster, but not for newbies.
Live View / Split View
If you plan on using the built-in "Live view" or "Split view", it's slower than going with Alt+Tab / Ctrl+R. And there's no trick to solve cross-browser inconsistencies
What really speeds thinks up
The regular code completion, syntax highlighter, automatic tag closing (like when typing </), the xHTML templates, not using hacks on top of other hacks, not using conditional styles, ignoring everyone else in the room.
What can you do to speed up front-end dev in general
Besides outsourcing, it helps to know HTML & CSS good, and your experience and technique. If you put a div, then switch to CSS then back to some more divs, then back to some other CSS this takes longer than writing header + footer html code, then moving onto styling the divs, the menus, etc.
On top of everything, slicing images still takes time. And if you want to be able to rapidly change things in your layout in the future, or make sub-layouts based on a template, it's naturally going to take more time. And add to that, the cross-browser compatibility testing. If you have a boss and he tells you "let's support IE6" you might want to consider a career in a different company.
P.S.: Is this another hunting topic? :)

How/Where to learn laying out Webforms in ASP.NET 2.0+ versus Winforms (VB.NET)?

Looking for some direction here as I'm running into some migration problems.
We have a legacy application. The 'infrastructure' is running just fine. Business logic and data access layers written in VB calling SQL Server for the database.
I have a LOT of experience writing Winforms (desktop) application and have had no problems. However, the last time I wrote any ASP.NET stuff was in 1.1 (VS.NET 2003).
Among other things, for ASP.NET 2.0 and up, the Grid layout is gone. It's not just a simple case of dropping controls on a form, aligning them, ordering them and working with the code-behind anymore.
The new web-based application is starting out pretty simple. Just a common header (already made a user control for that) and footer with your typical CRUD functions in the middle.
I tried being 'intuative' in using a master page with content place holders but I couldn't get the placeholders to "grow", to say nothing of not being able to put a text box where I wanted one. Oh, I found the option in VS2008 to allow absolute positioning but it only worked for SOME controls - others I had to manually edit the asp tags.
Then I saw examples using div's and tried to implement them but I ended up with results that had objects writing on top of each other. The online help wasn't helpful to say the least.
Does anyone know of a good book, website or tutorial that can give the basics of what I'm looking for? In practice, I'm looking to make simple pages where some objects may have to push others gurther down the y-axis (as in, several comments being made and that section would push the section listing the 'attachments' down further). I have no trouble when it comes to all the other aspects of this application. It just appears that my webforms skills are about 3-4 years out of date.
This isn't going to be some fancy flash/silverlight application - just simple 'data maintenance' to get rid of some ugly and bug-prone processes involving reading common mailboxes and decoding Word files. The new goal is to have a nice weborm with proper validation.
I guess what I'm looking for is a "Webforms for Winforms programmers" book or site.
Help!
Thanks in advance.
The best advice I've heard on learning to use html/css layout goes something like this:
When building a new page, don't try to get all fancy up front. Start by building a very basic, text-only page. It should look like something from 1996- that brief period where everyone had just discovered the web but had not yet started using the table tag for layout- only no comic sans font. Don't use images at this point, unless the image is genuinely a part of the information being conveyed (as opposed to the window dressing to make it look pretty: you can add those later). There will likely be an h1 at the top of the page, and give each sub heading an appropriate hN, but at this point there shouldn't be any layout information in the page at all. The only place you'll have a table tag is if you genuinely have tabular data to show. If it helps you write this code then you can wrap everything in old-fashioned <center> tags for now- just don't forget to remove them later.
Now let's start tweaking the markup a little. Use things like ul (unordered list) for your list of navigation links and label/legend to identify and group your form areas. The general idea here is to have each element on the page encased in the most appropriate html tag, and to use the full set of available tags- each for it's designated purpose.
At this point you have a page that is ideally suited for a screen reader or search engine. By building this page first, you have made SEO and accessibility compliance easy on yourself. Of course those aren't the only requirements, so we're not done yet.
Now you need to identify the different sections of your page, from both the layout and logical perspectives. The page should largely already be divided logically, but you may find a few places where the normal tags don't cut it. You'll also want to group certain elements for layout reasons. Encase each of these areas with a div tag, and give the tag a class name that refers to the purpose for the tag: the group your are creating. This is just another case of using the a tag (the "division" tag) for it's intended purpose. Also, since elements can have more than one class, you may want to think about also grouping your classes logically. For example, you might want to have a separate class that distinguishes the site template from the rest of the page.
By and large this should not have changed the appearance of the page, but now you have something where it should be very easy to start adding styles. At this point you can now start adding images and layout. The goal here, though, is to change the actual markup as little as possible. If you can manage it only add ids and classes, though you will likely need to add an additional span or div that you had not identified earlier, and sometimes you'll need an extra block level element to force a compatible layout across browsers.
If things are done correctly, the result is a page that not only looks good, but is also easier to work with when testing across browsers, will naturally degrade well when a style or javascript feature isn't supported, and scores well for SEO and accessibility. This also makes it easier to have a developer build a simple page that provides a certain level of functionality, which they can this pass off to a separate designer to make it look good.
You may also want to check out A List Apart. This is a great website with lots of "tricks" for using CSS to layout things on the web along with lots of other web oriented content.
Grid positioning was an abomination for websites. Sure it made for an easy transition from those familiar with the WinForms designer, but it produced horride HTML that is nearly impossible to maintain.
The very best resource I can recommend to you is CSS Mastery. You'll need to learn HTML and CSS, but they're quite easy to get into.
By the sounds of it, you're looking for a crash course in HTML ?
the "Design Canvas" of an ASP.NET aspx Page & ascx Control is just HTML tag markup.
If you've no web design experience, I'd recommend starting somewhere like
W3Schools
When Microsoft gave us ASP.NET, they tried to make programming websites, more like programming rich client applications. However, there are a lot of issues you have to deal with, the major one being statelessness, when developing for the web that don't exist when developing a thick client app (WinForms). So the first step is to not think of the two as similar in anyway.
The drag and drop tools are nice, but what you really need to understand is HTML and client server models. HTML will help you understand how things are getting laid out, and client server models are important to understand how data gets to and from the web to the server. If you have developed in ASP.NET 1.1, then things really haven't changed for 2.0. The concepts are the same, just some of the provided controls have changed.
A lot of people were really unhappy with the grid-based layout from 1.1, because it didn't really work in a number of situations. It still has to ultimately render as html, and html just isn't suited to that kind of layout. For example, things might not be ordered properly or pushed off the screen for mobile browsers (iPhone, etc). There's also things like screen readers for the blind. If you work for the government, that 2nd item is a legal requirement rather than just a nice-to-have, and there are a lot of developers who do work for the government.
So ASP.Net 2.0 tried to generate markup that's at least a little nicer for html. The downside is that you actually have to understand html layout now. But, c'mon: you're building a web site. If you can't handle a little html you're in real trouble.
My advice to build one static page using something other than visual studio. Use <input tags rather than server controls on that page and don't actually implement any logic. Use it to understand how your layout will need to work. Once you have that down, it's really easy to duplicate that for your pages in Visual Studio.
This doesn't really belong as a separate answer, but I wasn't sure you were likely to see another comment to my response above.
The normal behavior of all block-level elements, including divs, is for each new element to appear below the previous element. It sounds like you've set position:absolute; on everything, perhaps while playing with the Grid-based layout option in visual studio. Don't do that- it's hijacked the expected behavior and that's why you see everything piled on top of each other.

Resources