answerstu

web development - Database model for keeping track of likes/shares/comments on blog posts over time

My goal is to keep track of the popular posts on different blog sites based on social network activity at any given time. The goal is not to simply get the most popular now, but instead find posts that are popular compared to other posts on the same blog. For example, I follow a tech blog, a sports blog, and a gossip blog. The tech blog gets waaay more readership than the other two blogs, so in raw numbers every post on the tech blog will always out number views on the other two. So lets say the average tech blog post gets 500 facebook likes an...Read more

web development - CSS Classes for semantics vs. styles in general cases

The W3C spec on the class attribute says There are no additional restrictions on the tokens authors can use in the class attribute, but authors are encouraged to use values that describe the nature of the content, rather than values that describe the desired presentation of the content.ReferenceI work on a massive website that has many disparate pages. We have a default stylesheet that is shared across practically all pages. I find it useful to have CSS rulesets such as these:.center { text-align: center; }.red { color: red; }However, these ...Read more

web development - How difficult is Python and Django to pick up for a Java/.NET web developer?

I just started a new job a couple months ago at a small company where I am currently leading all development efforts present and future. I personally have years of experience in software design and development from mostly Java but also a .NET perspective. I picked up .NET later in my career with great ease and required literally no training to hit the ground running, and on top of that it helped me to truly grasp and appreciate the universality of many best practices and common themes by seeing two different perspectives to solving the same p...Read more

web development - Django - separation from the frontend (Templates)

Long story short, let's assume I want to create a webpage that would enable the users to sell used cars.I am a beginner to webdev, so pardon my ignorance. Fun fact: two months ago I knew literally nothing, I considered HTML as a relic of 90s, not in use anymore LOL.I've been told I need something for the BACKEND and for the FRONTEND As I know python pretty well I went for django for the backendAs I knew literally nothing about the frontend, my friend suggestedme AngularJSI have some doubts whether I'm heading the right direction.Django is a bac...Read more

web development - Framework vs Vanilla JS for students

I'm serving as a tech lead for a student group's charity project. We're building a website which puts a bunch of homelessness resources in one place. There are two goals to the project: create a useful website, and let students learn as they build it.The group is comprised of all levels of college CS student. Most have never done web dev or worked with any of the associated technologies. People get uneasy when I mention using a JS framework.I want to make sure they get out of it what they came in for -- which by all reports is learning -- but I...Read more

web development - What would be the best option in this scenario?

I have a statement. I know the ups and downs of both Composition and Inheritance, but I am unable to realize that what would be the best option the given scenario.SCENARIO:A Software company is developing a website for a university using a multiple inheritance between classes. The classes include Person, Teacher, Student, GradStudent, GradTeachAsst.For some reasons, the project design team decided not to use multiple inheritance for GradTeachAsst class, and give two alternatives. One is to use Composition and other is combination of Single Inhe...Read more

web development - How to describe an API-like request that is browser-to-browser?

I'm building a web application that has a feature which allows visitors to directly access resources using URL patterns, for example:www.site.com/client/[clientID]/orderswww.site.com/client/[clientID]/orders/[orderId]/detailsThese URLs can be static or dynamic links from other applications/sites. The URLs are secured, but if header of the HTTP request contains the authentication token (e.g. the visitor was logged into the previous site), then the authentication process is invisible to the visitor.My question is, is it correct to describe this f...Read more

web development - How to update display during large processing job

I have an ASP.NET C# application that needs to go off and iterate through a directory of .xml files and do some processing on the data inside them. This is easy enough, but i need to display the result after each .xml is processed, how can this be done? What im really asking here is how do you process a lot of data in a loop that needs to be displayed back to the client even though the server processing has not fully completed. Is this even possible?I could start the big process in a seperate thread and start a js timeout to postback and essent...Read more

angular2 - Client side web development - dealing with authentication during development

We are beginning development of an Angular 2 application. Our back-end will be using ASP.NET Core WebAPI.Although my subject calls out authentication, this also applies to any API service that is-but-kinda-isn't required for the client-side app to function. Specifically, authentication, logging, etc.Right now we have to spin up several services in order for the Angular app to fire up. This is a huge pain in the butt. Ideally, I would like for us to have a "development" flag that we turn on so that we can merrily go about developing on our l...Read more

web development - Is it the standard accepted practice to install software using VBScript?

Consider the following requirementsWindows software which communicates with a web application using basic authenticationThe software is an MSI packageThe software requires a token to be placed in order to authenticate itself to the web application The token is unique to every user, but the user is expected to install the software with the same token on several machinesThe question is:What is the best strategy to distribute the software from the web application with appropriate token in it ? (The user should not be asked to enter the token.)The ...Read more

web development - How to architect a very big web application using server and / or client rendering?

I recently finished a project which contains more than 30 different pages/features. Each one with some CRUD and more subpages. Each page is totally different from another in purpose. All of it was made using ASP.NET MVC Core and some Ajax for querying some rendered views.Today I'm starting a new project that will be similar to that one in complexity. I would like to start with some SPA framework like Angular4 or React. However I do have some options:Make a giant SPA that will contain all the 30 different pages/features and all sub pages and use...Read more

web development - RESTful web service and delta updates - advantages and disadvantages

Our front-end developers have requested that the RESTful Java web services to support delta queries. The use case for this is to handle periodic ajax refresh of the screen to bring in new data (deltas). I can see a few advantages of this:Makes front-end logic simple (i.e. no complicated deduping logic)Reduce network traffic (i.e. response size is smaller)However, there are some concern as well:supporting delta will require the service to be stateful, whichimpact scalabilityheavy use of caching (results cached per user per query, to determinethe...Read more

web development - Blog is a single webpage that gets data asyncronously, searchable by Search Engines?

I have created a blog for a friend. I have heavily designed it around jQuery's $.ajax() function and as a result it is only a single webpage asynchronously gets its data (title, article, relative image paths, etc.) from the database.To navigate, a visitor can do the following: Type on a given search <input>, site will give buttons, and then when a button is pressed, show the data asynchronously to the document area of the sitePress on the default buttons, and the page will load the data asynchronously to the document area of the siteBeing...Read more

web development - Database Architecture - Comprehensive history of likes/shares/etc for all accounts?

The SetupThis is a membership-based site. Each account is capable of:Making posts (unlimited, no restriction on frequency)Liking, sharing and commenting (on) the other postsThe goal is to provide the smallest possible resolution for account stats. Instead of bundling likes into groups of 15-minute intervals (or something similar), we are storing every like as it happens.Right now, it is a single table tracking likes, for all accounts. Something like...Table: users (Accounts)user_id (pk)... remaining data (name, login, etc)----Table: postspost_i...Read more