I have an SO Clone IN ASP CORE. How do we feel about building on that?

Sorry for being a tad late to the party, but I just read
https://forum.codidact.org/t/i-have-an-se-clone-how-do-we-feel-about-building-on-that
And it has just been closed, so I can’t comment there.

Basically I have something similar.
Advantage: It’s in ASP Core (2.1)
Disadvantage: It’s not complete
So it’s kind of a middle way for the 2 given options.

Quick facts about the current state:

  • It’s written in Clean Architecture
  • Uses MSSQL, but via NHibernate, so can easily be switched to PostGre
  • Has swagger running for the API
  • Frontend is currently done in Vue via an APS Core SPA template (Which, to me, mainly meant it automatically runs a vue dev server so you can adjust the UI “in real time”)
  • more than 80% coverage

Things that need to be done for MVP:

  • Currently uses homebrew identity (yeah i know, it was for me to experiment)
  • Frontend layout is clean, but design needs… well to be done, foremost (however, using material design via vue-material, it looks mostly clean already)
  • Flagging posts
  • Proper search function (nothing more than an SQL LIKE for the title right now)
  • Roles and rights are there, but need to become DB tables (currently just hardcoded)
  • (Email-) Notifications for tags etc (something i never used myself)

And probably a bunch of other stuff I’m forgetting now. Maybe easier to say what it does at the moment:

  • you can log in
  • you can start writing a question
  • between question title & body, it will then display similar questions
  • you can post a question
  • you can answer a question
  • You can Up-/Down vote

All in all, I now feel like it’s pretty small what I’m offering here. But maybe that’s a strength, because that means it’s small enough to adjust it to exactly what we want. Honestly, I wouldn’t know, because I didn’t even have the chance to read a lot of the stuff here in the forum yet. However, as I JUST saw that other post, I didn’t want to be too late with this.

Now tell me why it sucks :smiley:
Or ask if you have any questions, obviously. There’s like, no documentation at all for it.

EDIT:
Amazing, I forgot the actual link to the repo. Anyway, here it is:
https://bitbucket.org/raphaelschmitz/answers/src/master/

11 Likes

Well, if we were going to start from a premade project rather than from scratch, this is definitely a better starting point than Art’s one, from the technology stack alone. Let’s have a look at the code…

1 Like

Is there a demo instance running somewhere?

My understanding of @ArtOfCode’s proposal is that we have something nearly ready to go live with if we had to; it would be rewritten from scratch regardless, as opposed to built upon.

Nope, sorry, not even that. I just always run from visual studio. (and to be honest, it doesn’t LOOK amazing because I didn’t care about design yet).

Might put one up on azure later, but right now I’m still busy.

1 Like

Nice work! Thanks for bringing it up.

My thoughts on the other thread also apply here:

I agree . From a non-technical point of view, something that gets us up and running quicker is a major definitely short-term positive.

The biggest advantage of doing so short term is that it lets us discover pitfalls, drawbacks and mistakes as we go with little risk of them getting ‘baked in’ . This is a very useful thing. We can experiment, test and refine with real world data and make the final C# product better from that; while we can do this as we go with C#, there’s less of an expectation of that sort of radical change.

I can’t comment on the architecture/technical side of things of yours vs qpixel. Maybe you and Art can compare each other’s work?

If a community came to us tomorrow and said “we want an exodus, do you have somewhere we can go?”, it would be golden to be able to say “yes, there’s qpixel/answers; use that for now while we continue to refine and build”.

1 Like

Would it make sense to ask around or make a poll of tech stacks people are most familiar with so that we could choose a set of technologies which the most people can easily pick up and contribute?

1 Like

Would it make sense to ask around or make a poll of tech stacks people are most familiar with so that we could choose a set of technologies which the most people can easily pick up and contribute?

As far as I’m aware, that already happened. Only it happened in discord and isn’t really documented here. (I only gathered as much from a couple of comments.)

The only thing I know about is that the choice fell on ASP Core as framework (that’s why I thought my unfinished ASP project might be better suited than a finished Ruby on rails app) and PostGre as DB. But I also have no idea what the plan for the UI was.

2 Likes

First of all: Awesome. I’ll look at it tomorrow/on the weekend.

You wondered, why the other post was locked. The reason is that it attracted a lot of discussion that would (probably) not lead to any consensus. Per this post we closed the thread and started a vote. If you have a specific dev-related question, you can (and should) ask it here in the #development category.

This is definitely an important point. I think the whole decision kind of depends on this (Ruby for ever/now).

There are two major differences between these two clones:

  • qpixel is in a production-ready state. It’s not quite feature-complete with everything we’d want, but it’s not far off. Answers is not production-ready or feature-complete.
  • Answers is in ASP.NET Core, which is our chosen stack; qpixel is not.

Given the first point there, we’ll use the results of the current poll as follows:

  • If Yes, we use qpixel for now; polish and finish the final features, and deploy. We can then develop our own platform in ASP.NET Core, which could either be a build from scratch or a development of Answers; TBD.
  • If No, we use the latter half of that - we develop our own and deploy that whenever it’s ready; it could either be from scratch or developing on Answers.
1 Like

My concerns are that starting with an existing code base may result in more work to restructure the database to meet our ultimate goals. The catch is that, while I’ve already voted No anyway (I think I did), it is kind of hard to really judge objectively without a much more thorough examination of the code base than most of us are likely to do in the next day or two.

No easy answer as it really would be nice to be able to jumpstart the coding and production system by piggybacking on existing code. But unknown how good the code, the database structure and other key design issues were handled in someone else’s code.

4 Likes

@manassehkatz If you’d find it helpful, I can dump a complete SQL database schema and put it in a Gist for you to take a look at.

2 Likes

OK. That would help.

2 Likes

Well, this is a start.

But there are a lot of issues I see. Quite a bit would need to be added, better indexes, additional indexes, tags as another table instead of just text, comments should be text rather than varchar, some of the varchars should be shorter, a lot more history tables (and/or detail within existing history tables), site/community identification, etc.

So my hunch is that the amount of work needed to get “close to MVP” will be quite significant. And therefore may or may not be worth doing rather than starting fresh.

The good news is that the schema is on the right track, so I would reasonably expect that if we expanded it enough to get the basics working (but which would be more than trivial changes) that porting it all over to a from-scratch-new-system schema would be quite doable.

2 Likes

But there are a lot of issues I see.

Well I can tell you that Answers probably has even more issues. Honestly, the main advantage… or rather let’s say, the main work that we don’t have to do anymore would be to start from a working project structure. Like Joel on software says

Open Source software is often developed without anyone getting paid to develop it, which changes the dynamics a lot. […] It’s rare in the open source world to have a face to face conversation around a whiteboard drawing boxes and arrows, so the kind of design decisions which benefit from drawing boxes and arrows are usually decided poorly on such projects.

Now, I didn’t have face-to-face meetings with myself :smirk:, but I did spend a lot of time drawing boxes and arrows and setting up a structure. Way more than writing functionality. So if that structure is actually congruent with what we want, that’ll end up being the main question here.

Current plan

I’m afraid I won’t be able to spend sufficient time on this before the weekend. However, as has become clear now, the current yes/no poll is about if we go with an existing project, not about which project. That makes this thread here less time-critical.

So this weekend I will put it up on Azure and create some documentation explaining the codebase and model structure. Then we’ll see where it is on a scale from “not what we want at all” to “an ideal starting place to save us some work while not restricting the direction too much”.

A bit sidenote-ish, maybe the best solution ends up being a hybrid of the 2 options given now - use QPixel for now and build up Answers in the mean time.

3 Likes

With regards to starting from scratch, or using an existing code base, I’d like to share the following thoughts. (This isn’t a criticism of anyone’s code, project or approach, it’s just some observations about trying to start a project from an existing, unproven, start point. Please don’t take any offence from this post, I’m just trying to be constructive, in offering this opposing point of view.)

With any large scale project like this, its very important to consider the maintainability of the project from the start. You need to get all of the key decisions in place before you consider writing any code. First and foremost, you should establish coding standards for each technology that will be used within the project. You should also establish best practices that should be followed. This very important in a highly controlled business environment where everyone is in the same office, it’s even more vital for a decentralised team of volunteers.

I feel uneasy about using an existing codebase, because it’s effectively bypassing these initial steps, and forcing decisions upon us that weren’t necessarily in the best interests of this project. True, we’re talking about another Q&A clone, how different can it be from our Q&A clone? But how similar were the objectives of the clone, to the objectives of our product? Was it also intended to be a large scale replacement for Stack Overflow and other network sites? Was it just a proof of concept, or something that the developer could learn from? Was it designed in a way where the front end can be split off for an independent team to work from? These are just some of the questions that we not only need an answer to, but we need the correct answer to.

The compatibility of an existing codebase to our objectives, requirements, and yet to be agreed, coding standards and best practices, is unlikely. I understand the desire of people to “just get something out there”, but if we don’t get the organisational groundwork in place correctly, the project will likely encounter problems that it cannot overcome, and ultimately fail. I think it’s fair to say that we all want this to be a success.

3 Likes

No offence taken. On the contrary, I agree with you. A lot. I think going with any codebase (also one from scratch) without being clear about its architecture/structure would be a grave mistake.

However, in my experience it’s easier to “present a full plan” and then change the details to what you want. Even if we dislike 70% of a given solution, it’s can still be easier to throw those parts out and start at 30% instead of zero. (It could also not be, of course).

I rather fear the other end here - if we start with “tabs vs. spaces”, it’ll take weeks before we have the first screen online.

3 Likes

Would it be a good idea to create a list of polls with every basic core Q&A site functionality and basically ask for “yes/no” vote if people have no objections to each point, but if they have objections, to vote “no” and explain what they think needs to be changed?

I think this way we can at least agree on the majority of core features and that’s going to be our starting point. I like this more rather than figuring out what is good/bad about someone’s recreation of a basic SE alternative or reverse-engineering SE itself. Although I guess both are valuable discussions to have and I think we’d lose if we don’t have them both at some point. But for the sake of choosing the fastest route, I propose a poll/list of basic functionalities.

Hi and welcome, @raphaelschmitz! Thanks for sharing that idea.

I haven’t read the full thread carefully yet(!), just OP (and skimmed over replies), but already got at least a couple of questions that I’d like to make about some of the technical decisions.

I’d like to invite you to our Discord server, if you haven’t joined already.

As I got a very busy day ahead of me right now… please allow me to fire just one question to get things started: Why did you opt for NHibernate specifically?

And, if you wish to expand on that, what other options did you consider and how do they differ? For instance, how do you find EF or linq2db compared to NHibernate?

I hope to talk to you at greater depth very soon. :slightly_smiling_face: