YAFLogo

sianabanana
  • sianabanana
  • 52.2% (Neutral)
  • YAF Forumling Topic Starter
10 years ago
Can someone point me in the right direction for some instructions for intalling YAF with MYSQL.

Im starting from scratch and just want to nock u a proof of concept.

I would like to get this running from source code, as later i will need to look in to intergrating with my own membership provider.

Not sure where to start

Sponsor

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
10 years ago
The easiest way to start is by downloading the MySQL data layer for YetAnotherForum

https://github.com/vzrus/YetAnotherForumExtraDataLayers 

P.S: And no need to create duplicated Topics, i deleted the other one.

sianabanana
  • sianabanana
  • 52.2% (Neutral)
  • YAF Forumling Topic Starter
10 years ago
Sorry about reposting. I realised that it was in the wrong group.

Will read the instructions and see how i get on.

I couldnt find this link when i was googling, so thanks for that.

sianabanana
  • sianabanana
  • 52.2% (Neutral)
  • YAF Forumling Topic Starter
10 years ago
Can i ask why the data layers have to be relpaced.

Is there a technical reason why another data layer cannot be created side by side with the ms sql one and then the data layter choosen at runtime? ie through DI?

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
10 years ago
Originally Posted by: sianabanana 

Can i ask why the data layers have to be relpaced.

Is there a technical reason why another data layer cannot be created side by side with the ms sql one and then the data layter choosen at runtime? ie through DI?

You can make it if you like. The data layer is in community hands.

sianabanana
  • sianabanana
  • 52.2% (Neutral)
  • YAF Forumling Topic Starter
10 years ago
Might do. Once i have it running, if it suits my needs i might well do that.

Has anyone done any investigation on the feasibility of doing this? Has it been suggested before.

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
10 years ago
I'm working on simplifying the DAL right now. My current tactic is to create a dynamic data layer object that calls sprocs and handles paramertization dynamically.

That way it's plugin compatible with the existing LegacyDb calls.

E.g., I can replace this type of call: LegacyDb.post_list(many,many,many,many,many,parameters);

with:

new DynamicDb().Current.getdata_post_list(many,many,many,many,many,parameters);

The dynamic keyword allows me to dynamically create the call. Works great so far.. but I haven't committed it.

The main need here is to not call the Db as a static class... so that we can use DI to put any data access system in there. But the LegacyDb is a huge class... if it's changed radically, you will have a huge job on your hands.

That's why I did it this way. It dynamically maps the sprocs and params to the DB during runtime with minimal coding changes effectively reducing 90% of the code in LegacyDb to around 60 lines of code.

I'll commit soon... you'll have a much better head start on the proper MySQL data layer.

sianabanana
  • sianabanana
  • 52.2% (Neutral)
  • YAF Forumling Topic Starter
10 years ago
ok Thanks. Are you using mysql?
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
10 years ago
I'll sync the sql scripts to the moment before the changes. So there will be a sound base for development.
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
10 years ago
Originally Posted by: sianabanana 

ok Thanks. Are you using mysql?

Did you read my post?

sianabanana
  • sianabanana
  • 52.2% (Neutral)
  • YAF Forumling Topic Starter
10 years ago
Originally Posted by: Jaben 

Originally Posted by: sianabanana 

ok Thanks. Are you using mysql?

Did you read my post?

Yes, but i was just checking if you were simplyfying things for the sake of simplyfying them, or because you needed to make changes for adding mysql/any data source support.

I take it its the former

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
10 years ago
Yes, both reasons.

Here's the basic idea:

YAF.Classes.Data will disappear into to two parts: the interfaces will move to YAF.Types and the basic implementation will move to YAF.Core.

I will add a new module called YAF.Data.MsSql which will ship with YAF.NET. I will provide all specific functionality associated with MsSql.

I can assist with making YAF.Data.MySQL and other data layer modules (maybe I'll help Bbobb do some rearranging)... but ultimately, I'd need the community to support it as my time is limited.

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
10 years ago
As I already have a bulky but very flexible factory pattern with data layers combined which suits best for my needs I'm highly sceptical about the plans.

My first personal requirement - I should have a possibility to connect to various data sources on per control basis, data layer object should be thread-safe and have a lazy initialization where it's possible.

Singleton patterns are questionable in WebFarm environements too and unpleasant surprises are quite possible. I personally need very reliable and FAST data layers.

Anyway I don't completely throw away a possibility of a third-party .dll from me for YAF and MySQL in future if it will suit my basic and specific needs above..But source code for will be available and everyone can use it according to GPLv2 terms.

The best solution now according to my viewpoint would be to debug YAF and make a stable release to link to stable MySQL sources. It will simplify further work with it for everyone who wants to modify it support it and sync it. If no new features will be added it's quite feasable in a month scope if every live developer will participate in it.