Skip to content

Conversation

@sudhanshuv1
Copy link
Contributor

Adds the guide to design patterns in Developer guides, (using https://github.com/design-patterns-for-humans/vala)

Fixes #63 .

@lw64
Copy link
Contributor

lw64 commented Apr 7, 2025

nice! I see that both a .rst and .md are commited, is that correct? I think they are the same and only the .rst is used, right?

@sudhanshuv1
Copy link
Contributor Author

nice! I see that both a .rst and .md are commited, is that correct? I think they are the same and only the .rst is used, right?

Yeah, only the .rst is used to display the page and I have used sphinx to extract contents from the .md whenever applicable. I haven't modified the contents however, I copied it as it is from the markdown so maybe that needs to be looked at.

Copy link
Member

@colinkiama colinkiama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for the pull request!

Unfortunately, this doesn't follow a similar style and structure like the other guides and tutorials in the documentation.

Because the design patterns markdown file is so huge, I suggest using pandoc to convert the file from Markdown (.MD) to reStructuredText (.rst).

I'm happy with the result of that being added.

Optionally: It would be really cool if you could split the guide into multiple pages too. Much better than reading one enormous page 😅.

Good luck!

@lw64
Copy link
Contributor

lw64 commented Apr 12, 2025

splitting the guide is not that hard. I wrote a simple python script once, that parses the subheadings, and moves them into its own file.

@sudhanshuv1
Copy link
Contributor Author

splitting the guide is not that hard. I wrote a simple python script once, that parses the subheadings, and moves them into its own file.

Do you have it on github? If you could share it that would be really helpful.

@lw64
Copy link
Contributor

lw64 commented Apr 13, 2025

sadly not, was a one-time-throw away thing I guess 🥲

@sudhanshuv1
Copy link
Contributor Author

sudhanshuv1 commented Apr 24, 2025

@colinkiama the design patterns are grouped in 3 categories, each one having multiple examples. We could either keep them into 3 pages, each page having all design patterns of a particular category. But we could also have one design pattern per page (which would require >25 pages), so I need your opinion on how to split it, on the basis of categories (creational/structural/behavioral), or one page for every example?

@colinkiama
Copy link
Member

I think that 3 pages is fine.

We could explore how we could organise this better in another merge request in the future.

@colinkiama
Copy link
Member

@sudhanshuv1 is this merge request ready now?

Copy link
Member

@colinkiama colinkiama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, there is one more change left to do



.. figure::
https://cloud.githubusercontent.com/assets/11269635/23065273/1b7e5938-f515-11e6-8dd3-d0d58de6bb9a.png
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image needs to be in the website. A relative link to the website

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it, sorry for the delay.

Copy link
Member

@colinkiama colinkiama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you for your contribution!

@colinkiama colinkiama merged commit 0bddb1b into vala-lang:main Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "design patterns for humans"

3 participants